PHP Class Imbo\EventListener\ExifMetadata

This listener will look for properties stored in the image, and store them as metadata in Imbo.
Author: Espen Hovlandsdal ([email protected])
Author: Christer Edvartsen ([email protected])
Inheritance: implements Imbo\EventListener\ListenerInterface
Mostrar archivo Open project: imbo/imbo Class Usage Examples

Protected Properties

Property Type Description
$allowedTags array An array of allowed tags
$properties array Exif properties

Public Methods

Method Description
__construct ( array $params = null ) Class constructor
getImagick ( ) : Imagick Get an Imagick instance
getSubscribedEvents ( )
populate ( Imbo\EventManager\EventInterface $event ) : array Read exif data from incoming image
save ( Imbo\EventManager\EventInterface $event ) Save metadata to database
setImagick ( Imagick $imagick ) : self Set an Imagick instance

Protected Methods

Method Description
filterProperties ( array $properties ) : array Filter out any unwanted properties
parseGpsCoordinate ( string $coordinate, string $hemisphere ) : float Parse GPS coordinates in hours/minutes/seconds-format to decimal degrees
parseProperties ( array $rawProperties ) : array Parse an array of properties into a storable format

Method Details

__construct() public method

Class constructor
public __construct ( array $params = null )
$params array Parameters for the event listener

filterProperties() protected method

Filter out any unwanted properties
protected filterProperties ( array $properties ) : array
$properties array An array of properties to filter
return array A filtered array of properties

getImagick() public method

Get an Imagick instance
public getImagick ( ) : Imagick
return Imagick

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

parseGpsCoordinate() protected method

Parse GPS coordinates in hours/minutes/seconds-format to decimal degrees
protected parseGpsCoordinate ( string $coordinate, string $hemisphere ) : float
$coordinate string Coordinate in hours/minutes/seconds format
$hemisphere string Hemisphere identifier (N, E, S, W)
return float

parseProperties() protected method

Parse an array of properties into a storable format
protected parseProperties ( array $rawProperties ) : array
$rawProperties array An array of properties to parse
return array Parsed array of properties

populate() public method

Read exif data from incoming image
public populate ( Imbo\EventManager\EventInterface $event ) : array
$event Imbo\EventManager\EventInterface The triggered event
return array

save() public method

Save metadata to database
public save ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The triggered event

setImagick() public method

Set an Imagick instance
public setImagick ( Imagick $imagick ) : self
$imagick Imagick An instance of Imagick
return self

Property Details

$allowedTags protected_oe property

An array of allowed tags
protected array $allowedTags
return array

$properties protected_oe property

Exif properties
protected array $properties
return array