Файл vendor/intervention/image/src/Colors/Rgb/Decoders/TransparentColorDecoder.php Вес запакованого файла 313b (313 b) Вес распакованого файла: 746b (746 b) Метод сжатия: 8
<?php
declare(strict_types=1);
namespace Intervention\Image\Colors\Rgb\Decoders;
use Intervention\Image\Exceptions\DecoderException;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\ColorInterface;
class TransparentColorDecoder extends HexColorDecoder
{
/**
* {@inheritdoc}
*
* @see DecoderInterface::decode()
*/
public function decode(mixed $input): ImageInterface|ColorInterface
{
if (!is_string($input)) {
throw new DecoderException('Unable to decode input');
}
if (strtolower($input) !== 'transparent') {
throw new DecoderException('Unable to decode input');
}
return parent::decode('#ffffff00');
}
}