ImageResource
DTO for a resolved image resource. Mainly used by ContentObjectRenderer.
Tags
Table of Contents
Properties
- $extension : string
- $fullPath : string
- $height : int
- $originalFile : File|null
- $processedFile : ProcessedFile|null
- $publicUrl : string|null
- $width : int
Methods
- __construct() : mixed
- createFromImageInfo() : self
- createFromProcessedFile() : self
- getExtension() : string
- getFullPath() : string
- getHeight() : int
- getLegacyImageResourceInformation() : array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}
- Legacy image resource information, used for asset collector and GifBuilder BBOX
- getOriginalFile() : File|null
- getProcessedFile() : ProcessedFile|null
- getPublicUrl() : string|null
- getWidth() : int
- withExtension() : self
- withFullPath() : self
- withHeight() : self
- withOriginalFile() : self
- withProcessedFile() : self
- withPublicUrl() : self
- withWidth() : self
Properties
$extension
protected
string
$extension
$fullPath
protected
string
$fullPath
$height
protected
int
$height
$originalFile
protected
File|null
$originalFile
= null
$processedFile
protected
ProcessedFile|null
$processedFile
= null
$publicUrl
protected
string|null
$publicUrl
= null
$width
protected
int
$width
Methods
__construct()
public
__construct(int $width, int $height, string $extension, string $fullPath[, string|null $publicUrl = null ][, File|null $originalFile = null ][, ProcessedFile|null $processedFile = null ]) : mixed
Parameters
- $width : int
- $height : int
- $extension : string
- $fullPath : string
- $publicUrl : string|null = null
- $originalFile : File|null = null
- $processedFile : ProcessedFile|null = null
createFromImageInfo()
public
static createFromImageInfo(ImageInfo $imageInfo) : self
Parameters
- $imageInfo : ImageInfo
Return values
selfcreateFromProcessedFile()
public
static createFromProcessedFile(ProcessedFile $processedFile) : self
Parameters
- $processedFile : ProcessedFile
Return values
selfgetExtension()
public
getExtension() : string
Return values
stringgetFullPath()
public
getFullPath() : string
Return values
stringgetHeight()
public
getHeight() : int
Return values
intgetLegacyImageResourceInformation()
Legacy image resource information, used for asset collector and GifBuilder BBOX
public
getLegacyImageResourceInformation() : array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}
Return values
array{0: int<0, max>, 1: int<0, max>, 2: string, 3: string, 'origFile': string|null, 'origFile_mtime': int}getOriginalFile()
public
getOriginalFile() : File|null
Return values
File|nullgetProcessedFile()
public
getProcessedFile() : ProcessedFile|null
Return values
ProcessedFile|nullgetPublicUrl()
public
getPublicUrl() : string|null
Return values
string|nullgetWidth()
public
getWidth() : int
Return values
intwithExtension()
public
withExtension(string $extension) : self
Parameters
- $extension : string
Return values
selfwithFullPath()
public
withFullPath(string $fullPath) : self
Parameters
- $fullPath : string
Return values
selfwithHeight()
public
withHeight(int $height) : self
Parameters
- $height : int
Return values
selfwithOriginalFile()
public
withOriginalFile(File|null $originalFile) : self
Parameters
- $originalFile : File|null
Return values
selfwithProcessedFile()
public
withProcessedFile(ProcessedFile|null $processedFile) : self
Parameters
- $processedFile : ProcessedFile|null
Return values
selfwithPublicUrl()
public
withPublicUrl(string $publicUrl) : self
Parameters
- $publicUrl : string
Return values
selfwithWidth()
public
withWidth(int $width) : self
Parameters
- $width : int