PHP Class Imbo\Model\Image

Author: Christer Edvartsen ([email protected])
Inheritance: implements Imbo\Model\ModelInterface
Afficher le fichier Open project: imbo/imbo Class Usage Examples

Méthodes publiques

Свойство Type Description
$mimeTypeMapping array Mapping for some mime types
$mimeTypes array Supported mime types and the correct file extensions

Méthodes publiques

Méthode Description
getAddedDate ( ) : DateTime Get the added date
getBlob ( ) : string Get the blob
getChecksum ( ) : string Get the checksum of the current image data
getData ( )
getExtension ( ) : string Get the extension
getFileExtension ( string $mime ) : boolean | string Get the file extension mapped to a mime type
getFilesize ( ) : integer Get the size of the image data in bytes
getHeight ( ) : integer Get the height
getImageIdentifier ( ) : string Get the image identifier
getMetadata ( ) : array Get the metadata
getMimeType ( ) : string Get the mime type
getOriginalChecksum ( ) : string Get the original checksum of the current image data
getUpdatedDate ( ) : DateTime Get the updated date
getUser ( ) : string Get the user
getWidth ( ) : integer Get the width
hasBeenTransformed ( boolean | null $flag = null ) : boolean | self Set or get the hasBeenTransformed flag
setAddedDate ( DateTime $added ) : Image Set the added date
setBlob ( string $blob ) : Image Set the blob and update filesize and checksum properties
setChecksum ( string $checksum ) : Image Set the checksum
setExtension ( string $extension ) : Image Set the extension
setFilesize ( integer $size ) : Image Set the size of the image in bytes
setHeight ( integer $height ) : Image Set the height
setImageIdentifier ( string $imageIdentifier ) : Image Set the image identifier
setMetadata ( array $metadata ) : Image Set the metadata
setMimeType ( string $mimeType ) : Image Set the mime type
setOriginalChecksum ( $checksum ) : Image Set the original checksum
setUpdatedDate ( DateTime $updated ) : Image Set the updated date
setUser ( string $user ) : Image Set the user
setWidth ( integer $width ) : Image Set the width
supportedMimeType ( string $mime ) : boolean Check if a mime type is supported by Imbo

Method Details

getAddedDate() public méthode

Get the added date
public getAddedDate ( ) : DateTime
Résultat DateTime

getBlob() public méthode

Get the blob
public getBlob ( ) : string
Résultat string

getChecksum() public méthode

Get the checksum of the current image data
public getChecksum ( ) : string
Résultat string

getData() public méthode

public getData ( )

getExtension() public méthode

Get the extension
public getExtension ( ) : string
Résultat string

getFileExtension() public static méthode

Get the file extension mapped to a mime type
public static getFileExtension ( string $mime ) : boolean | string
$mime string The mime type. For instance "image/png"
Résultat boolean | string The extension (without the leading dot) on success or boolean false if the mime type is not supported.

getFilesize() public méthode

Get the size of the image data in bytes
public getFilesize ( ) : integer
Résultat integer

getHeight() public méthode

Get the height
public getHeight ( ) : integer
Résultat integer

getImageIdentifier() public méthode

Get the image identifier
public getImageIdentifier ( ) : string
Résultat string

getMetadata() public méthode

Get the metadata
public getMetadata ( ) : array
Résultat array

getMimeType() public méthode

Get the mime type
public getMimeType ( ) : string
Résultat string

getOriginalChecksum() public méthode

Get the original checksum of the current image data
public getOriginalChecksum ( ) : string
Résultat string

getUpdatedDate() public méthode

Get the updated date
public getUpdatedDate ( ) : DateTime
Résultat DateTime

getUser() public méthode

Get the user
public getUser ( ) : string
Résultat string

getWidth() public méthode

Get the width
public getWidth ( ) : integer
Résultat integer

hasBeenTransformed() public méthode

Set or get the hasBeenTransformed flag
public hasBeenTransformed ( boolean | null $flag = null ) : boolean | self
$flag boolean | null Skip the argument to get the current value
Résultat boolean | self

setAddedDate() public méthode

Set the added date
public setAddedDate ( DateTime $added ) : Image
$added DateTime When the image was added
Résultat Image

setBlob() public méthode

Set the blob and update filesize and checksum properties
public setBlob ( string $blob ) : Image
$blob string The binary data to set
Résultat Image

setChecksum() public méthode

Set the checksum
public setChecksum ( string $checksum ) : Image
$checksum string The checksum to set
Résultat Image

setExtension() public méthode

Set the extension
public setExtension ( string $extension ) : Image
$extension string The file extension
Résultat Image

setFilesize() public méthode

Set the size of the image in bytes
public setFilesize ( integer $size ) : Image
$size integer The size of the image
Résultat Image

setHeight() public méthode

Set the height
public setHeight ( integer $height ) : Image
$height integer Height in pixels
Résultat Image

setImageIdentifier() public méthode

Set the image identifier
public setImageIdentifier ( string $imageIdentifier ) : Image
$imageIdentifier string The image identifier
Résultat Image

setMetadata() public méthode

Set the metadata
public setMetadata ( array $metadata ) : Image
$metadata array An array with metadata
Résultat Image

setMimeType() public méthode

Set the mime type
public setMimeType ( string $mimeType ) : Image
$mimeType string The mime type, for instance "image/png"
Résultat Image

setOriginalChecksum() public méthode

Set the original checksum
public setOriginalChecksum ( $checksum ) : Image
Résultat Image

setUpdatedDate() public méthode

Set the updated date
public setUpdatedDate ( DateTime $updated ) : Image
$updated DateTime When the image was updated
Résultat Image

setUser() public méthode

Set the user
public setUser ( string $user ) : Image
$user string The user
Résultat Image

setWidth() public méthode

Set the width
public setWidth ( integer $width ) : Image
$width integer Width in pixels
Résultat Image

supportedMimeType() public static méthode

Check if a mime type is supported by Imbo
public static supportedMimeType ( string $mime ) : boolean
$mime string The mime type to check. For instance "image/png"
Résultat boolean

Property Details

$mimeTypeMapping public_oe static_oe property

Mapping for some mime types
public static array $mimeTypeMapping
Résultat array

$mimeTypes public_oe static_oe property

Supported mime types and the correct file extensions
public static array $mimeTypes
Résultat array