Base class for file variations (i.e. image aliases).
Properties¶
$dirPath¶
|
|
The path to the file (for example "var/storage/images/test/199-2-eng-GB")
$fileName¶
|
|
The name of the file (for example "my_image.png")
$fileSize¶
|
|
Number of bytes for current variation
$height¶
|
|
The height as number of pixels (for example "256")
$imageId¶
|
|
$info¶
|
|
Extra information about the image, depending on the image type
$lastModified¶
|
|
When the variation was last modified
$mimeType¶
|
|
The MIME type (for example "image/png")
$name¶
|
|
The name of the image alias (for example "original")
$uri¶
|
|
Complete path + name of image file (for example "var/storage/images/test/199-2-eng-GB/apple.png")
$width¶
|
|
The width as number of pixels (for example "320")
$dirPath¶
The path to the file (for example "var/storage/images/test/199-2-eng-GB").
|
|
$fileName¶
The name of the file (for example "my_image.png").
|
|
$fileSize¶
Number of bytes for current variation.
|
|
$handler¶
Contains identifier of variation handler used to generate this particular variation.
|
|
$height¶
The height as number of pixels (for example "256").
|
|
$imageId¶
|
|
$info¶
Contains extra information about the image, depending on the image type.
|
|
It will typically contain EXIF information from digital cameras or information about animated GIFs. If there is no information, the info will be a boolean FALSE.
Beware: This information may contain e.g. HTML, JavaScript, or PHP code, and should be treated like any other user-submitted data. Make sure it is properly escaped before use.
$isExternal¶
Indicator if variation image is external (like Fastly IO) or local (like built-in Imagine based alias).
|
|
External images won't have SPLInfo data and image dimensions as it would be redundant to fetch file.
$lastModified¶
When the variation was last modified.
|
|
$mimeType¶
The MIME type (for example "image/png").
|
|
$name¶
The name of the image alias (for example "original").
|
|
$uri¶
Complete path + name of image file (for example "var/storage/images/test/199-2-eng-GB/apple.png").
|
|
$width¶
The width as number of pixels (for example "320").
|
|
Methods¶
__construct() ¶
Construct object optionally with a set of properties.
|
|
Readonly properties values must be set using $properties as they are not writable anymore after object has been created.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$properties | array<string|int, mixed> | [] | - |
getProperties() ¶
Function where list of properties are returned.
|
|
Used by attributes(), override to add dynamic properties
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dynamicProperties | array<string|int, mixed> | [] |
Additional dynamic properties exposed on the object |
Return values
array<string|int, mixed>