PHP 클래스 Horde_Image_Base, horde

저자: Chuck Hagenbuch ([email protected])
저자: Michael J. Rubinsky ([email protected])
저자: Jan Schneider ([email protected])
상속: extends EmptyIterator
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_background string Background color.
$_capabilities array Capabilites of this driver.
$_context Cache the context
$_data string The current image data.
$_height integer The current height of the image data.
$_loadedEffects array Array containing available Effects
$_logger Logger.
$_tmpdir string A directory for temporary files.
$_type string What kind of images should ImageMagick generate? Defaults to 'png'.
$_width integer The current width of the image data.

공개 메소드들

메소드 설명
__call ( $method, $args ) Catch-all method so that we don't error out when calling an unsupported manipulation method.
addEffect ( string $type, array $params ) Attempts to apply requested effect to this image.
applyEffects ( ) Applies any effects in the effect queue.
brush ( integer $x, integer $y, string $color = 'black', string $shape = 'square' ) Draws a shaped point at the specified (x,y) point.
clearGeometry ( ) Utility function to zero out cached geometry information.
display ( ) Displays the current image.
getCapabilities ( ) : array Returns the capabilities.
getContentType ( ) : string Returns the MIME type for this image.
getDimensions ( ) : array Returns the height and width of the current image data.
getImageAtIndex ( integer $index ) : Horde_Image_Base Returns a specific image from the pages of images.
getImagePageCount ( ) : integer Returns the number of image pages available in the image object.
getLoadedEffects ( ) Returns a list of available effects for this driver.
getTmpDir ( ) : string Returns the current temporary directory.
getType ( ) : string Returns the image type.
hasCapability ( string $capability ) : boolean Checks the existence of a particular capability.
headers ( ) Sends HTTP headers for the image.
loadFile ( string $filename ) Loads the image data from a file.
loadString ( string $image_data ) Loads the image data from a string.
raw ( boolean $convert = false ) : string Returns the raw data for this image.
reset ( ) Resets the image data to defaults.
setType ( string $type ) : string Sets the output image type.
toFile ( $data = null ) : string Saves image data to file.

보호된 메소드들

메소드 설명
__construct ( array $params, array $context = [] ) Constructor.
_logDebug ( string $message ) Logs a message at debug level.
_logErr ( string $message ) Logs a message at error level.

메소드 상세

__call() 공개 메소드

Catch-all method so that we don't error out when calling an unsupported manipulation method.
public __call ( $method, $args )

__construct() 보호된 메소드

Constructor.
protected __construct ( array $params, array $context = [] )
$params array The image object parameters. Values include: - background: (string) The background color. DEFAULT: white. - data: (string) The image binary data. - height: (integer) The desired image height. - type: (string) The output image type (png, jpeg etc.). DEFAULT: png. - width: (integer) The desired image width.
$context array The object context - configuration, injected objects: - logger: (Horde_Log_Logger) A logger. - tmpdir: [REQUIRED] (string) Temporary directory.

_logDebug() 보호된 메소드

Logs a message at debug level.
protected _logDebug ( string $message )
$message string The log message.

_logErr() 보호된 메소드

Logs a message at error level.
protected _logErr ( string $message )
$message string The log message.

addEffect() 공개 메소드

Attempts to apply requested effect to this image.
public addEffect ( string $type, array $params )
$type string The type of effect to apply.
$params array Any parameters for the effect.

applyEffects() 공개 메소드

Applies any effects in the effect queue.
public applyEffects ( )

brush() 공개 메소드

Useful for scatter diagrams, debug points, etc. Draws squares, circles, diamonds, and triangles.
public brush ( integer $x, integer $y, string $color = 'black', string $shape = 'square' )
$x integer The x coordinate of the point to brush.
$y integer The y coordinate of the point to brush.
$color string The color to brush the point with.
$shape string What brush to use? Defaults to a square.

clearGeometry() 공개 메소드

Shouldn't really be called from client code, but is needed since effects may need to clear these.
public clearGeometry ( )

display() 공개 메소드

Displays the current image.
public display ( )

getCapabilities() 공개 메소드

Returns the capabilities.
public getCapabilities ( ) : array
리턴 array A list of backend capabilities.

getContentType() 공개 메소드

Returns the MIME type for this image.
public getContentType ( ) : string
리턴 string The MIME type for this image.

getDimensions() 공개 메소드

Returns the height and width of the current image data.
public getDimensions ( ) : array
리턴 array An hash with 'width' containing the width, 'height' containing the height of the image.

getImageAtIndex() 공개 메소드

Returns a specific image from the pages of images.
public getImageAtIndex ( integer $index ) : Horde_Image_Base
$index integer The index to return.
리턴 Horde_Image_Base The requested image

getImagePageCount() 공개 메소드

Returns the number of image pages available in the image object.
public getImagePageCount ( ) : integer
리턴 integer The number of images.

getLoadedEffects() 공개 메소드

Returns a list of available effects for this driver.
public getLoadedEffects ( )

getTmpDir() 공개 메소드

Returns the current temporary directory.
public getTmpDir ( ) : string
리턴 string The current temporary directory.

getType() 공개 메소드

Returns the image type.
public getType ( ) : string
리턴 string The type of this image (png, jpg, etc.).

hasCapability() 공개 메소드

Checks the existence of a particular capability.
public hasCapability ( string $capability ) : boolean
$capability string The capability to check for.
리턴 boolean True if the backend has this capability.

headers() 공개 메소드

Sends HTTP headers for the image.
public headers ( )

loadFile() 공개 메소드

Loads the image data from a file.
public loadFile ( string $filename )
$filename string The full path and filename to the file to load the image data from.

loadString() 공개 메소드

Loads the image data from a string.
public loadString ( string $image_data )
$image_data string The data to use for the image.

raw() 공개 메소드

Returns the raw data for this image.
public raw ( boolean $convert = false ) : string
$convert boolean If true, the image data will be returned in the target format, independently from any image operations.
리턴 string The raw image data.

reset() 공개 메소드

Resets the image data to defaults.
public reset ( )

setType() 공개 메소드

Sets the output image type.
public setType ( string $type ) : string
$type string An image type (png, jpg, etc.)
리턴 string The previous image type.

toFile() 공개 메소드

If $data is false, saves current image data after performing any pending operations on the data. If $data contains raw image data, saves that data to file without regard for the current image data.
public toFile ( $data = null ) : string
리턴 string Path to temporary file.

프로퍼티 상세

$_background 보호되어 있는 프로퍼티

Background color.
protected string $_background
리턴 string

$_capabilities 보호되어 있는 프로퍼티

Capabilites of this driver.
protected array $_capabilities
리턴 array

$_context 보호되어 있는 프로퍼티

Cache the context
protected $_context

$_data 보호되어 있는 프로퍼티

The current image data.
protected string $_data
리턴 string

$_height 보호되어 있는 프로퍼티

The current height of the image data.
protected int $_height
리턴 integer

$_loadedEffects 보호되어 있는 프로퍼티

Array containing available Effects
protected array $_loadedEffects
리턴 array

$_logger 보호되어 있는 프로퍼티

Logger.
protected $_logger

$_tmpdir 보호되어 있는 프로퍼티

A directory for temporary files.
protected string $_tmpdir
리턴 string

$_type 보호되어 있는 프로퍼티

What kind of images should ImageMagick generate? Defaults to 'png'.
protected string $_type
리턴 string

$_width 보호되어 있는 프로퍼티

The current width of the image data.
protected int $_width
리턴 integer