Programming Language PHP

Namespace Plank\Mediable\Exceptions

Class ImageManipulationException

Method/Function unknownVariant

Total Examples 1

1 code examples of PHP Plank\Mediable\Exceptions\ImageManipulationException::unknownVariant extracted from open source projects

Was this example useful?
0
                                                    /**
     * @throws ImageManipulationException if Variant is not defined
     */
    public function getVariantDefinition(string $variantName): ImageManipulation
    {
        if (isset($this->variantDefinitions[$variantName])) {
            return $this->variantDefinitions[$variantName];
        }

        throw ImageManipulationException::unknownVariant($variantName);
    }
                                            
ImageManipulationException's Other Methods