PHP Class Imbo\EventListener\Imagick

This event listener is responsible for reading the initial image data, and updating the model before sending back transformed images to the client, or when storing transformed images in the storage.
Author: Christer Edvartsen ([email protected])
Inheritance: implements Imbo\EventListener\ListenerInterface
Show file Open project: imbo/imbo Class Usage Examples

Public Methods

Method Description
getSubscribedEvents ( )
readImageBlob ( Imbo\EventManager\EventInterface $event ) Inject the image blob from the image model into the shared imagick instance
setImagick ( Imagick $imagick ) : self Set the local \Imagick property
updateModel ( Imbo\EventManager\EventInterface $event ) Update the model data if the image has been changed
updateModelBeforeStoring ( Imbo\EventManager\EventInterface $event ) Update the image model blob before storing it in case an event listener has changed the image

Method Details

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

readImageBlob() public method

Inject the image blob from the image model into the shared imagick instance
public readImageBlob ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance

setImagick() public method

Set the local \Imagick property
public setImagick ( Imagick $imagick ) : self
$imagick Imagick An Imagick instance
return self

updateModel() public method

Update the model data if the image has been changed
public updateModel ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance

updateModelBeforeStoring() public method

Update the image model blob before storing it in case an event listener has changed the image
public updateModelBeforeStoring ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance