PHP Class Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManager

Inheritance: implements Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository, Sulu\Bundle\MediaBundle\Media\FormatCache\FormatCacheInterface $formatCache, Sulu\Bundle\MediaBundle\Media\ImageConverter\ImageConverterInterface $converter, string $saveImage, array $responseHeaders, array $formats, array $supportedMimeTypes )
clearCache ( )
getFormatDefinition ( $formatKey, $locale = null, array $formatOptions = [] )
getFormatDefinitions ( $locale = null, array $formatOptions = [] )
getFormats ( $id, $fileName, $storageOptions, $version, $subVersion, $mimeType )
getMediaProperties ( $url )
purge ( $idMedia, $fileName, $options )
returnImage ( $id, $formatKey )

Méthodes protégées

Méthode Description
getResponseHeaders ( string $mimeType = '', boolean $setExpireHeaders = false ) : array
replaceExtension ( string $filename, $mimeType ) : string

Private Methods

Méthode Description
checkMimeTypeSupported ( $mimeType ) : boolean Returns true if the given mime type is supported, otherwise false.
getLatestFileVersion ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media ) : FileVersion

Method Details

__construct() public méthode

public __construct ( Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository, Sulu\Bundle\MediaBundle\Media\FormatCache\FormatCacheInterface $formatCache, Sulu\Bundle\MediaBundle\Media\ImageConverter\ImageConverterInterface $converter, string $saveImage, array $responseHeaders, array $formats, array $supportedMimeTypes )
$mediaRepository Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface
$formatCache Sulu\Bundle\MediaBundle\Media\FormatCache\FormatCacheInterface
$converter Sulu\Bundle\MediaBundle\Media\ImageConverter\ImageConverterInterface
$saveImage string
$responseHeaders array
$formats array
$supportedMimeTypes array

clearCache() public méthode

public clearCache ( )

getFormatDefinition() public méthode

public getFormatDefinition ( $formatKey, $locale = null, array $formatOptions = [] )
$formatOptions array

getFormatDefinitions() public méthode

public getFormatDefinitions ( $locale = null, array $formatOptions = [] )
$formatOptions array

getFormats() public méthode

public getFormats ( $id, $fileName, $storageOptions, $version, $subVersion, $mimeType )

getMediaProperties() public méthode

public getMediaProperties ( $url )

getResponseHeaders() protected méthode

protected getResponseHeaders ( string $mimeType = '', boolean $setExpireHeaders = false ) : array
$mimeType string
$setExpireHeaders boolean
Résultat array

purge() public méthode

public purge ( $idMedia, $fileName, $options )

replaceExtension() protected méthode

protected replaceExtension ( string $filename, $mimeType ) : string
$filename string
Résultat string

returnImage() public méthode

public returnImage ( $id, $formatKey )