PHP Класс Neos\Media\Domain\Service\ImageService

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

applyAdjustments() защищенный метод

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.
Результат Imagine\Image\ImageInterface

getImageSize() публичный метод

Get the size of a Flow PersistentResource that contains an image file.
public getImageSize ( PersistentResource $resource ) : array
$resource Neos\Flow\ResourceManagement\PersistentResource
Результат array width and height as keys

getOptionsMergedWithDefaults() защищенный метод

protected getOptionsMergedWithDefaults ( array $additionalOptions = [] ) : array
$additionalOptions array
Результат array

injectSettings() публичный метод

public injectSettings ( array $settings ) : void
$settings array
Результат void

isAnimatedGif() защищенный метод

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
Результат boolean true if gif contains more than one frame

processImage() публичный метод

public processImage ( PersistentResource $originalResource, array $adjustments ) : array
$originalResource Neos\Flow\ResourceManagement\PersistentResource
$adjustments array
Результат array resource, width, height as keys

Описание свойств

$assetRepository защищенное свойство

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
Результат Neos\Media\Domain\Repository\AssetRepository

$environment защищенное свойство

protected Environment,Neos\Flow\Utility $environment
Результат Neos\Flow\Utility\Environment

$imageSizeCache защищенное свойство

protected VariableFrontend,Neos\Cache\Frontend $imageSizeCache
Результат Neos\Cache\Frontend\VariableFrontend

$imagineService защищенное свойство

protected ImagineInterface,Imagine\Image $imagineService
Результат Imagine\Image\ImagineInterface

$resourceManager защищенное свойство

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Результат Neos\Flow\ResourceManagement\ResourceManager

$settings защищенное свойство

protected array $settings
Результат array