AssetProcessingContext
in package
FinalYes
Input for {@see AssetFormatProcessor}: the raw bytes of one uploaded file plus where and in which variants to store them.
extension is already normalized by the registry (AssetFormatRegistry::resolveExtension()),
i.e. jfif arrives here as jpg. The processor may therefore use it directly as the file
extension on disk without validating it again.
Table of Contents
Properties
- $absBase : string
- $extension : string
- $fileName : string
- $rawData : string
- $variantConfigs : array<string|int, mixed>
Methods
- __construct() : mixed
- getAbsBase() : string
- Absolute asset directory with a trailing slash; variants are its subfolders.
- getExtension() : string
- getFileName() : string
- File name without the extension (random, generated by the caller).
- getRawData() : string
-
getVariantConfigs()
: array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array
, useWatermark: bool}>
Properties
$absBase read-only
private
string
$absBase
$extension read-only
private
string
$extension
$fileName read-only
private
string
$fileName
$rawData read-only
private
string
$rawData
$variantConfigs read-only
private
array<string|int, mixed>
$variantConfigs
Methods
__construct()
public
__construct(string $rawData, string $extension, string $fileName, string $absBase, array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array, useWatermark: bool}> $variantConfigs) : mixed
Parameters
- $rawData : string
- $extension : string
- $fileName : string
- $absBase : string
-
$variantConfigs
: array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array
, useWatermark: bool}>
getAbsBase()
Absolute asset directory with a trailing slash; variants are its subfolders.
public
getAbsBase() : string
Return values
stringgetExtension()
public
getExtension() : string
Return values
stringgetFileName()
File name without the extension (random, generated by the caller).
public
getFileName() : string
Return values
stringgetRawData()
public
getRawData() : string
Return values
stringgetVariantConfigs()
public
getVariantConfigs() : array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array, useWatermark: bool}>