Вход Регистрация
Файл: vendor/intervention/image/src/Drivers/Gd/Decoders/Base64ImageDecoder.php
Строк: 45
<?php

declare(strict_types=1);

namespace 
InterventionImageDriversGdDecoders;

use 
InterventionImageExceptionsDecoderException;
use 
InterventionImageInterfacesColorInterface;
use 
InterventionImageInterfacesDecoderInterface;
use 
InterventionImageInterfacesImageInterface;

class 
Base64ImageDecoder extends BinaryImageDecoder implements DecoderInterface
{
    
/**
     * {@inheritdoc}
     *
     * @see DecoderInterface::decode()
     */
    
public function decode(mixed $input): ImageInterface|ColorInterface
    
{
        if (!
$this->isValidBase64($input)) {
            throw new 
DecoderException('Unable to decode input');
        }

        return 
parent::decode(base64_decode((string) $input));
    }
}
Онлайн: 2
Реклама