RasterImageProcessor
in package
implements
AssetFormatProcessor
FinalYes
Classic raster images: the full pipeline (resize by the variant plan plus watermark).
jfif arrives here already renamed to jpg; the translation is done by
AssetFormatRegistry because they are the same
JPEG bytes with a different extension.
Table of Contents
Interfaces
- AssetFormatProcessor
- Processes one format of an uploaded file: receives the bytes and the variant plan, writes files to disk and reports what was created.
Properties
Methods
- __construct() : mixed
- getExtensions() : array<int, string>
- Extensions (lowercase, without the dot) handled by the processor. They must be disjoint across processors; the registry reports a configuration error on a collision.
- getKind() : AssetFormatKind
- getMimeTypes() : array<int, string>
- MIME types matching {@see getExtensions()}; the uploaders build their `accept` attributes from them so that client and server stay in agreement.
- process() : AssetProcessingResult
Properties
$variantRenderer read-only
private
VariantRenderer
$variantRenderer
Methods
__construct()
public
__construct(VariantRenderer $variantRenderer) : mixed
Parameters
- $variantRenderer : VariantRenderer
getExtensions()
Extensions (lowercase, without the dot) handled by the processor. They must be disjoint across processors; the registry reports a configuration error on a collision.
public
getExtensions() : array<int, string>
Return values
array<int, string>getKind()
public
getKind() : AssetFormatKind
Return values
AssetFormatKindgetMimeTypes()
MIME types matching {@see getExtensions()}; the uploaders build their `accept` attributes from them so that client and server stay in agreement.
public
getMimeTypes() : array<int, string>
Return values
array<int, string>process()
public
process(AssetProcessingContext $context) : AssetProcessingResult
Parameters
- $context : AssetProcessingContext