PHP Class Neos\Media\Domain\Service\ImageService

Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$environment Neos\Flow\Utility\Environment
$imageSizeCache Neos\Cache\Frontend\VariableFrontend
$imagineService Imagine\Image\ImagineInterface
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$settings array

Méthodes publiques

Méthode Description
getImageSize ( PersistentResource $resource ) : array Get the size of a Flow PersistentResource that contains an image file.
injectSettings ( array $settings ) : void
processImage ( PersistentResource $originalResource, array $adjustments ) : array

Méthodes protégées

Méthode Description
applyAdjustments ( Imagine\Image\ImageInterface $image, array $adjustments, boolean &$adjustmentsApplied ) : Imagine\Image\ImageInterface
getOptionsMergedWithDefaults ( array $additionalOptions = [] ) : array
isAnimatedGif ( string $image ) : boolean Detects whether the given GIF image data contains more than one frame

Method Details

applyAdjustments() protected méthode

protected applyAdjustments ( Imagine\Image\ImageInterface $image, array $adjustments, boolean &$adjustmentsApplied ) : Imagine\Image\ImageInterface
$image Imagine\Image\ImageInterface
$adjustments array Ordered list of adjustments to apply.
$adjustmentsApplied boolean Reference to a variable that will hold information if an adjustment was actually applied.
Résultat Imagine\Image\ImageInterface

getImageSize() public méthode

Get the size of a Flow PersistentResource that contains an image file.
public getImageSize ( PersistentResource $resource ) : array
$resource Neos\Flow\ResourceManagement\PersistentResource
Résultat array width and height as keys

getOptionsMergedWithDefaults() protected méthode

protected getOptionsMergedWithDefaults ( array $additionalOptions = [] ) : array
$additionalOptions array
Résultat array

injectSettings() public méthode

public injectSettings ( array $settings ) : void
$settings array
Résultat void

isAnimatedGif() protected méthode

Detects whether the given GIF image data contains more than one frame
protected isAnimatedGif ( string $image ) : boolean
$image string string containing the binary GIF data
Résultat boolean true if gif contains more than one frame

processImage() public méthode

public processImage ( PersistentResource $originalResource, array $adjustments ) : array
$originalResource Neos\Flow\ResourceManagement\PersistentResource
$adjustments array
Résultat array resource, width, height as keys

Property Details

$assetRepository protected_oe property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
Résultat Neos\Media\Domain\Repository\AssetRepository

$environment protected_oe property

protected Environment,Neos\Flow\Utility $environment
Résultat Neos\Flow\Utility\Environment

$imageSizeCache protected_oe property

protected VariableFrontend,Neos\Cache\Frontend $imageSizeCache
Résultat Neos\Cache\Frontend\VariableFrontend

$imagineService protected_oe property

protected ImagineInterface,Imagine\Image $imagineService
Résultat Imagine\Image\ImagineInterface

$resourceManager protected_oe property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Résultat Neos\Flow\ResourceManagement\ResourceManager

$settings protected_oe property

protected array $settings
Résultat array