InteractsWithFilters
Table of Contents
Properties
- $pendingComplexFilters : Collection
Methods
- addFilter() : self
- Helper method to provide multiple ways to add a filter to the underlying media object.
- addFilterAsComplexFilter() : self
- Maps the arguments into a 'LegacyFilterMapping' instance and pushed it to the 'pendingComplexFilters' collection. These filters will be applied later on by the MediaExporter.
- addWatermark() : self
- Calls the callable with a WatermarkFactory instance and adds the freshly generated WatermarkFilter.
- getFilters() : array<string|int, mixed>
- Returns an array with the filters applied to the underlying media object.
- getPendingComplexFilters() : Collection
- Getter for the pending complex filters.
- resize() : self
- Shortcut for adding a Resize filter.
Properties
$pendingComplexFilters
protected
Collection
$pendingComplexFilters
Methods
addFilter()
Helper method to provide multiple ways to add a filter to the underlying media object.
public
addFilter() : self
Return values
selfaddFilterAsComplexFilter()
Maps the arguments into a 'LegacyFilterMapping' instance and pushed it to the 'pendingComplexFilters' collection. These filters will be applied later on by the MediaExporter.
public
addFilterAsComplexFilter(mixed $in, mixed $out, mixed ...$arguments) : self
Parameters
- $in : mixed
- $out : mixed
- $arguments : mixed
Return values
selfaddWatermark()
Calls the callable with a WatermarkFactory instance and adds the freshly generated WatermarkFilter.
public
addWatermark(callable $withWatermarkFactory) : self
Parameters
- $withWatermarkFactory : callable
Return values
selfgetFilters()
Returns an array with the filters applied to the underlying media object.
public
getFilters() : array<string|int, mixed>
Return values
array<string|int, mixed>getPendingComplexFilters()
Getter for the pending complex filters.
public
getPendingComplexFilters() : Collection
Return values
Collectionresize()
Shortcut for adding a Resize filter.
public
resize(int $width, int $height[, string $mode = ResizeFilter::RESIZEMODE_FIT ][, bool $forceStandards = true ]) : self
Parameters
- $width : int
- $height : int
- $mode : string = ResizeFilter::RESIZEMODE_FIT
- $forceStandards : bool = true