FileExtension
extends AbstractExtension
in package
implements
ContainerAwareInterface
uses
ContainerAwareTrait
Table of Contents
Interfaces
- ContainerAwareInterface
Constants
- FILE_OBJECT_PROPERTIES = ['size', 'readableFilesize', 'filesize', 'name', 'basename', 'dirname', 'filename', 'extension', 'origext', 'tmpname', 'path', 'value', 'mime', 'ctime', 'mtime', 'atime', 'icon', 'imageSize', 'width', 'height', 'imageViewSize', 'viewWidth', 'viewHeight', 'isImage', 'isGdImage', 'isSvgImage', 'channels', 'bits', 'isRgbImage', 'isCmykImage']
Methods
- convertBinaryToUuid() : mixed
- getFileContent() : mixed
- getFileData() : array<string|int, mixed>
- Get file data based on given uuid.
- getFilePath() : string
- Get file path based on given uuid.
- getFilters() : array<string|int, mixed>|array<string|int, Twig_SimpleFilter>
- Get list of twig filters.
Constants
FILE_OBJECT_PROPERTIES
public
mixed
FILE_OBJECT_PROPERTIES
= ['size', 'readableFilesize', 'filesize', 'name', 'basename', 'dirname', 'filename', 'extension', 'origext', 'tmpname', 'path', 'value', 'mime', 'ctime', 'mtime', 'atime', 'icon', 'imageSize', 'width', 'height', 'imageViewSize', 'viewWidth', 'viewHeight', 'isImage', 'isGdImage', 'isSvgImage', 'channels', 'bits', 'isRgbImage', 'isCmykImage']
Methods
convertBinaryToUuid()
public
convertBinaryToUuid(mixed $binary) : mixed
Parameters
- $binary : mixed
getFileContent()
public
getFileContent(mixed $file) : mixed
Parameters
- $file : mixed
getFileData()
Get file data based on given uuid.
public
getFileData(mixed $file[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $jsonSerializeOptions = [] ]) : array<string|int, mixed>
Parameters
- $file : mixed
-
File uuid
- $data : array<string|int, mixed> = []
-
Add file data here
- $jsonSerializeOptions : array<string|int, mixed> = []
-
Options for the object to array transformation
Tags
Return values
array<string|int, mixed> —File data
getFilePath()
Get file path based on given uuid.
public
getFilePath(mixed $file) : string
Parameters
- $file : mixed
-
File uuid
Return values
string —File path
getFilters()
Get list of twig filters.
public
getFilters() : array<string|int, mixed>|array<string|int, Twig_SimpleFilter>