Sgss_Imagen_Image
Represents an encapsuled image with attributes

Description

Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Imagen/Image.php (line 40)

Direct descendant

Sgss_Imagen_Image_File

Class overview

Variables

protected array $_attrs

Attributes of this image

protected string $_binary

Binary content of this image

protected int $_format

Format of this image

Methods

__construct (string $binary, int $format, [array $attrs = array()])

The constructor

mixed|null getAttr (scalar $name)

Returns the value of the specified attribute name of this image

array getAttrs ()

Returns all the attributes of this image as an associated array

string getBinary ()

Returns the binary content of this image

int getFormat ()
string __toString ()

Variable detail

$_attrs 

Attributes of this image

Signature:
protected array $_attrs


$_binary 

Binary content of this image

Signature:
protected string $_binary


$_format 

Format of this image

Signature:
protected int $_format


Method detail

__construct

The constructor

Parameters:
  • string $binary

    Binary content of the image

  • int $format

    Format of the image

  • array $attrs

    Attributes of the image

Overridden by:
Signature:
public __construct (string $binary, int $format, [array $attrs = array()])


getAttr

Returns the value of the specified attribute name of this image

Parameters:
  • scalar $name

    Attribute name of the value to be retrieved

Returns:
mixed|null -- Value of the attribute, or null if this image does not have the corresponding value
Signature:
public mixed|null getAttr (scalar $name)


getAttrs

Returns all the attributes of this image as an associated array

Returns:
array -- Associated array containing all the attributes of this image
Signature:
public array getAttrs ()


getBinary

Returns the binary content of this image

Returns:
string -- Binary content of this image
Overridden by:
Signature:
public string &getBinary ()


getFormat

Overridden by:
Signature:
public int getFormat ()


__toString

Uses:
sendHeader()
Signature:
public string __toString ()