refactor: susun semula struktur folder — Laravel source ke src/

This commit is contained in:
Saufi
2026-05-19 15:58:35 +08:00
parent f052251b94
commit bf53c71b45
10806 changed files with 1385379 additions and 121 deletions

View File

@@ -0,0 +1,53 @@
<?php
declare(strict_types=1);
namespace Intervention\Image;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\ModifierInterface;
class ModifierStack implements ModifierInterface
{
/**
* Create new modifier stack object with an array of modifier objects.
*
* @param array<ModifierInterface> $modifiers
*/
public function __construct(protected array $modifiers = [])
{
//
}
/**
* Create new modifier stack object statically.
*
* @param array<ModifierInterface> $modifiers
*/
public static function create(array $modifiers = []): self
{
return new self($modifiers);
}
/**
* Apply all modifiers in stack to the given image.
*/
public function apply(ImageInterface $image): ImageInterface
{
foreach ($this->modifiers as $modifier) {
$modifier->apply($image);
}
return $image;
}
/**
* Append new modifier to the stack.
*/
public function push(ModifierInterface $modifier): self
{
$this->modifiers[] = $modifier;
return $this;
}
}