abstract class AbstractImage implements ImageInterface, ClassFactoryAwareInterface

Properties

protected MetadataBag $metadata

Methods

thumbnail(BoxInterface $size, int|string $settings = ImageInterface::THUMBNAIL_INSET, string $filter = ImageInterface::FILTER_UNDEFINED)

Generates a thumbnail from a current image Returns it as a new image without modifying the current image unless the THUMBNAIL_FLAG_NOCLONE flag is specified.

int[]
getAllThumbnailModes()

Get all the available thumbnail modes.

array
updateSaveOptions(array $options)

Updates a given array of save options for backward compatibility with legacy names.

metadata()

Returns the Image's meta data.

__clone()

Clones all the resources associated to this instance.

getClassFactory()

Get the class factory instance to be used.

$this
setClassFactory(ClassFactoryInterface $classFactory)

Set the class factory instance to be used.

Details

at line 36
ManipulatorInterface thumbnail(BoxInterface $size, int|string $settings = ImageInterface::THUMBNAIL_INSET, string $filter = ImageInterface::FILTER_UNDEFINED)

Generates a thumbnail from a current image Returns it as a new image without modifying the current image unless the THUMBNAIL_FLAG_NOCLONE flag is specified.

Parameters

BoxInterface $size
int|string $settings One or more of the ManipulatorInterface::THUMBNAIL_ flags (joined with |). It may be a string for backward compatibility with old constant values that were strings.
string $filter The filter to use for resizing, one of ImageInterface::FILTER_*

Return Value

ManipulatorInterface

Exceptions

RuntimeException

See also

ManipulatorInterface::thumbnail

at line 146
protected int[] getAllThumbnailModes()

Get all the available thumbnail modes.

Return Value

int[]

at line 161
protected array updateSaveOptions(array $options)

Updates a given array of save options for backward compatibility with legacy names.

Parameters

array $options

Return Value

array

at line 176
MetadataBag metadata()

Returns the Image's meta data.

Return Value

MetadataBag

See also

ImageInterface::metadata

at line 184
__clone()

Clones all the resources associated to this instance.

at line 196
ClassFactoryInterface getClassFactory()

Get the class factory instance to be used.

at line 210
$this setClassFactory(ClassFactoryInterface $classFactory)

Set the class factory instance to be used.

Parameters

ClassFactoryInterface $classFactory

Return Value

$this

See also

ClassFactoryAwareInterface::setClassFactory