HumHub Documentation (unofficial)

AbstractImage
in package
implements ImageInterface, ClassFactoryAwareInterface

AbstractYes

Table of Contents

Interfaces

ImageInterface
The image interface.
ClassFactoryAwareInterface
An interface that classes that accepts a class factory should implement.

Properties

$metadata  : MetadataBag
$classFactory  : ClassFactoryInterface|null

Methods

__clone()  : mixed
Clones all the resources associated to this instance.
getClassFactory()  : ClassFactoryInterface
Get the class factory instance to be used.
metadata()  : MetadataBag
Returns the Image's meta data.
setClassFactory()  : $this
Set the class factory instance to be used.
thumbnail()  : static
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.
getAllFilterValues()  : array<string|int, string>
Get all the available filter defined in ImageInterface.
getAllThumbnailModes()  : array<string|int, int>
Get all the available thumbnail modes.
updateSaveOptions()  : array<string|int, mixed>
Updates a given array of save options for backward compatibility with legacy names.
checkThumbnailSettings()  : mixed
Check the settings argument in thumbnail() method.

Properties

Methods

__clone()

Clones all the resources associated to this instance.

public __clone() : mixed

thumbnail()

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.

public thumbnail(BoxInterface $size[, mixed $settings = ImageInterface::THUMBNAIL_INSET ][, mixed $filter = ImageInterface::FILTER_UNDEFINED ]) : static
Parameters
$size : BoxInterface
$settings : mixed = ImageInterface::THUMBNAIL_INSET

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.

$filter : mixed = ImageInterface::FILTER_UNDEFINED

The filter to use for resizing, one of ImageInterface::FILTER_*

Tags
see
ManipulatorInterface::thumbnail()
Return values
static

getAllFilterValues()

Get all the available filter defined in ImageInterface.

protected static getAllFilterValues() : array<string|int, string>
Return values
array<string|int, string>

getAllThumbnailModes()

Get all the available thumbnail modes.

protected getAllThumbnailModes() : array<string|int, int>
Return values
array<string|int, int>

updateSaveOptions()

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

protected updateSaveOptions(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed>
Return values
array<string|int, mixed>

checkThumbnailSettings()

Check the settings argument in thumbnail() method.

private checkThumbnailSettings(int $settings) : mixed
Parameters
$settings : int

        
On this page

Search results