PackageResource
class \
- Implements
- SystemResourceInterface, ProcessableFileInterface
Internal
Only to be used in TYPO3\CMS\Core\SystemResource namespace
Table of Contents
Interfaces
- SystemResourceInterface
- This interface is public API and can be referenced in third party code or throughout the TYPO3 core.
- ProcessableFileInterface
- Resources that can be processed with TYPO3's imaging pipeline - a FAL File, a FAL FileReference, or a resource outside the File Abstraction Layer (for example a system resource shipped with a package). FileReference does not implement SystemResourceInterface, so this cannot extend it the way ProcessedResourceInterface does - consumers that need SystemResourceInterface-level members (getImageDimension() and friends) narrow with an instanceof check first, same as for File-specific members.
Properties
Methods
- __construct() : mixed
- __toString() : string
- getContents() : string
- getExtension() : string
- getHash() : string
- getImageDimension() : ImageDimension
- Returns the dimensions of the referenced image.
- getMimeType() : string
- getName() : string
- getNameWithoutExtension() : string
- getResourceIdentifier() : string
- isImage() : bool
- Returns whether the referenced system resource is an image.
- process() : ProcessedFile|ProcessedResource
- Returns a processed (resized/cropped/converted) version of this resource. Unlike File::process(), which delegates to the ResourceStorage it already holds a reference to, this resource is constructed directly by SystemResourceFactory, not through a service with a FileProcessingService reference to delegate to - so this reaches it the same way GraphicalFunctions and the processors themselves do.
Properties
$identifier read-only
protected
PackageResourceIdentifier
$identifier
$resourceDefinition read-only
protected
ResourceDefinitionInterface
$resourceDefinition
Methods
__construct()
public
__construct(PackageResourceIdentifier $identifier, ResourceDefinitionInterface $resourceDefinition) : mixed
Parameters
- $identifier : PackageResourceIdentifier
- $resourceDefinition : ResourceDefinitionInterface
__toString()
public
__toString() : string
Return values
stringgetContents()
public
getContents() : string
Tags
Return values
stringgetExtension()
public
getExtension() : string
Return values
stringgetHash()
public
getHash() : string
Tags
Return values
stringgetImageDimension()
Returns the dimensions of the referenced image.
public
getImageDimension() : ImageDimension
Tags
Return values
ImageDimensiongetMimeType()
public
getMimeType() : string
Tags
Return values
stringgetName()
public
getName() : string
Return values
stringgetNameWithoutExtension()
public
getNameWithoutExtension() : string
Return values
stringgetResourceIdentifier()
public
getResourceIdentifier() : string
Return values
stringisImage()
Returns whether the referenced system resource is an image.
public
isImage() : bool
Tags
Return values
boolprocess()
Returns a processed (resized/cropped/converted) version of this resource. Unlike File::process(), which delegates to the ResourceStorage it already holds a reference to, this resource is constructed directly by SystemResourceFactory, not through a service with a FileProcessingService reference to delegate to - so this reaches it the same way GraphicalFunctions and the processors themselves do.
public
process(string $taskType, array $configuration) : ProcessedFile|ProcessedResource
Parameters
- $taskType : string
-
The task type of this processing
- $configuration : array
-
the processing configuration, see manual for that