Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_Image_Driver_Interface Interface Reference

Defines the interface that Perforce image manipulation drivers must implement. More...

Inheritance diagram for P4Cms_Image_Driver_Interface:
P4Cms_Image_Driver_Abstract P4Cms_Image_Driver_Gd P4Cms_Image_Driver_Imagick

List of all members.

Public Member Functions

 getData ($type=null)
 Return binary image data.
 getImageSize ()
 Return the image dimensions.
 hasData ()
 Check if there are image data to operate with.
 setData ($data=null)
 Set the image data.
 transform ($transform, $args=array())
 Apply the given transformation.

Static Public Member Functions

static getSupportedTransforms ()
 List of supported transformations.
static isSupportedTransform ($transform)
 Determine if the passed transformation is supported by this driver.
static isSupportedType ($type)
 Check if given image type is supported.

Detailed Description

Defines the interface that Perforce image manipulation drivers must implement.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

P4Cms_Image_Driver_Interface::getData ( type = null)

Return binary image data.

Parameters:
string$typeoptional - the image format (will return image data in the same format as input if not provided)
Returns:
string binary image data

Implemented in P4Cms_Image_Driver_Gd, and P4Cms_Image_Driver_Imagick.

P4Cms_Image_Driver_Interface::getImageSize ( )

Return the image dimensions.

Returns:
array associated array with image dimensions

Implemented in P4Cms_Image_Driver_Abstract.

static P4Cms_Image_Driver_Interface::getSupportedTransforms ( ) [static]

List of supported transformations.

Returns:
array a list of the supported transform operations

Implemented in P4Cms_Image_Driver_Abstract.

P4Cms_Image_Driver_Interface::hasData ( )

Check if there are image data to operate with.

Returns:
bool true if there has been image data set, false otherwise.

Implemented in P4Cms_Image_Driver_Gd, and P4Cms_Image_Driver_Imagick.

static P4Cms_Image_Driver_Interface::isSupportedTransform ( transform) [static]

Determine if the passed transformation is supported by this driver.

Parameters:
string$transformthe transformation to query.
Returns:
boolean true if the transformation supported by the current driver, false otherwise.

Implemented in P4Cms_Image_Driver_Abstract.

static P4Cms_Image_Driver_Interface::isSupportedType ( type) [static]

Check if given image type is supported.

Parameters:
string$typeimage type to check for
Returns:
bool true if given image type is supported, false otherwise

Implemented in P4Cms_Image_Driver_Gd, and P4Cms_Image_Driver_Imagick.

P4Cms_Image_Driver_Interface::setData ( data = null)

Set the image data.

Parameters:
string | null$dataoptional - image data
Returns:
P4Cms_Image_Driver_Interface provides fluent interface

Implemented in P4Cms_Image_Driver_Gd, and P4Cms_Image_Driver_Imagick.

P4Cms_Image_Driver_Interface::transform ( transform,
args = array() 
)

Apply the given transformation.

Parameters:
string$transformname of the transformation
array$argsoptional - transformation arguments

Implemented in P4Cms_Image_Driver_Abstract.


The documentation for this interface was generated from the following file: