PHP Interface Imbo\EventListener\ImageVariations\Database\DatabaseInterface

Author: Christer Edvartsen ([email protected])
Datei anzeigen Open project: imbo/imbo Interface Usage Examples

Public Methods

Method Description
deleteImageVariations ( string $user, string $imageIdentifier, integer $width = null ) : boolean Remove all metadata about image variations for an image
getBestMatch ( string $user, string $imageIdentifier, integer $width ) : integer | null Fetch the best match of an image
storeImageVariationMetadata ( string $user, string $imageIdentifier, integer $width, integer $height ) : boolean Store an image variation

Method Details

deleteImageVariations() public method

Remove all metadata about image variations for an image
public deleteImageVariations ( string $user, string $imageIdentifier, integer $width = null ) : boolean
$user string The user which the image belongs to
$imageIdentifier string The image identifier
$width integer Only delete the variation with this width
return boolean

getBestMatch() public method

Fetch the best match of an image
public getBestMatch ( string $user, string $imageIdentifier, integer $width ) : integer | null
$user string The user which the image belongs to
$imageIdentifier string The image identifier of the original
$width integer The width we want to resize the image to
return integer | null Returns the closest width, or null

storeImageVariationMetadata() public method

Store an image variation
public storeImageVariationMetadata ( string $user, string $imageIdentifier, integer $width, integer $height ) : boolean
$user string The user which the image belongs to
$imageIdentifier string The image identifier of the original
$width integer The width of the variation
$height integer The height of the variation
return boolean