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
                
        $lastModified
            ¶
    
        | 
                     | 
                
                    
                     | 
            
When the variation was last modified
                
        $mimeType
            ¶
    
        | 
                     | 
                
                    
                     | 
            
The MIME type (for example "image/png")
                
        $uri
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Complete path + name of image file (for example "var/storage/images/test/199-2-eng-GB/apple.png")
                
        $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.
                
        $name
            ¶
    
        The name of the image alias (for example "original").
| 
                     | 
                
                    
                     | 
            
                
        $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 aren't writable anymore
after object has been created.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $properties | array<string, mixed> | [] | - | 
                
getProperties()
            ¶
    
        Returns list of available properties' names.
| 
                     | 
                
                    
                     | 
            
Override to add dynamic properties.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $dynamicProperties | array<int, string> | [] | 
                                                         Additional dynamic properties exposed on the object  | 
                
Return values
array<int, string>
Attributes
- #[Ignore]