CoolCMS API

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

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
string

getFileName()

File name without the extension (random, generated by the caller).

public getFileName() : string
Return values
string

getVariantConfigs()

public getVariantConfigs() : array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array, useWatermark: bool}>
Return values
array<string, array{maxWidth: int, maxHeight: int, resizeFlags: array, useWatermark: bool}>
On this page

Search results