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

Inheritance: implements Sulu\Bundle\MediaBundle\Media\FormatManager\FormatManagerInterface
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Public Methods

Method 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 )

Protected Methods

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

Private Methods

Method 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 method

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 method

public clearCache ( )

getFormatDefinition() public method

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

getFormatDefinitions() public method

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

getFormats() public method

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

getMediaProperties() public method

public getMediaProperties ( $url )

getResponseHeaders() protected method

protected getResponseHeaders ( string $mimeType = '', boolean $setExpireHeaders = false ) : array
$mimeType string
$setExpireHeaders boolean
return array

purge() public method

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

replaceExtension() protected method

protected replaceExtension ( string $filename, $mimeType ) : string
$filename string
return string

returnImage() public method

public returnImage ( $id, $formatKey )