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

declare(strict_types=1);

namespace 
InterventionImageDrivers;

use 
InterventionImageExceptionsLogicException;
use 
InterventionImageInterfacesImageInterface;
use 
InterventionImageInterfacesModifierInterface;
use 
InterventionImageInterfacesSpecializedInterface;

abstract class 
SpecializableModifier extends Specializable implements ModifierInterface
{
    
/**
     * {@inheritdoc}
     *
     * @see ModifierInterface::apply()
     *
     * @throws LogicException
     */
    
public function apply(ImageInterface $image): ImageInterface
    
{
        if (
$this instanceof SpecializedInterface) {
            throw new 
LogicException(
                
"Specialized class '" . static::class . "' must override apply()",
            );
        }

        return 
$image->modify($this);
    }
}
Онлайн: 1
Реклама