Sgss_Imagen_Receipt_Item
Represents an item of image generation receipt

Description

Implements:
Countable (internal interface), ArrayAccess (internal interface)
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Imagen/Receipt/Item.php (line 53)

Class overview

Accessors

read-only string $type

Type of this item

read-only string $label

Label of this item

read-only array $params

Parameters in this item

Variables

protected string $_label

Label of this item

protected int $_numParams

The number of parameters in this item

protected array $_params

Parameters in this item

protected string $_type

Type of this item

Methods

__construct (string $type, string $label, [array $params = array()])

The constructor

int count ()
string getLabel ()

Returns the label of this item

mixed getParam (int $index)

Returns the parameter at the specified index of this item

int getParamCount ()

Returns the number of parameters in this item

array getParams ()

Returns the parameters of this item

string getType ()

Returns the type of this item

string hash ()

Returns the hash code which represents this item

boolean offsetExists (mixed $offset)
mixed offsetGet (mixed $offset)
mixed offsetSet (mixed $offset, mixed $value)
void offsetUnset (mixed $offset)
mixed __get (mixed $name)

Variable detail

$_label 

Label of this item

Signature:
protected string $_label


$_numParams 

The number of parameters in this item

Signature:
protected int $_numParams = 0


$_params 

Parameters in this item

Signature:
protected array $_params


$_type 

Type of this item

Signature:
protected string $_type


Method detail

__construct

The constructor

Parameters:
  • string $type

    Item type

  • string $label

    Item label

  • array $params

    Parameters of item

Signature:
public __construct (string $type, string $label, [array $params = array()])


count

Specified by:
  • Countable::count
Related subject:
Countable::count()
Signature:
public int count ()


getLabel

Returns the label of this item

Returns:
string -- Label of this item
Signature:
public string getLabel ()


getParam

Returns the parameter at the specified index of this item

Parameters:
  • int $index

    Index of the parameter to be retrieved

Returns:
mixed -- The parameter stored at the specified index
Throws:
  • Sgss_Imagen_Receipt_Exception

    When the specified index is below 0 or beyond the last index of the parameters of this item

Used by:
Sgss_Imagen_Receipt_Item::offsetGet()
Signature:
public mixed getParam (int $index)


getParamCount

Returns the number of parameters in this item

Returns:
int -- Number of parameters in this item
Signature:
public int getParamCount ()


getParams

Returns the parameters of this item

Returns:
array -- Parameters of this item
Signature:
public array getParams ()


getType

Returns the type of this item

Returns:
string -- Type of this item
Signature:
public string getType ()


hash

Returns the hash code which represents this item

Returns:
string -- Hash code which represents this item
Throws:
  • Sgss_Imagen_Receipt_Exception

    When unable to calculate hash code

Signature:
public string hash ()


offsetExists

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetExists
Related subject:
ArrayAccess::offsetExists()
Signature:
public boolean offsetExists (mixed $offset)


offsetGet

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetGet
Uses:
Sgss_Imagen_Receipt_Item::getParam()
Related subject:
ArrayAccess::offsetGet()
Signature:
public mixed offsetGet (mixed $offset)


offsetSet

Parameters:
  • mixed $offset
  • mixed $value
Specified by:
  • ArrayAccess::offsetSet
Uses:
setParam()
Related subject:
ArrayAccess::offsetSet()
Signature:
public mixed offsetSet (mixed $offset, mixed $value)


offsetUnset

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetUnset
Related subject:
ArrayAccess::offsetUnset()
Signature:
public void offsetUnset (mixed $offset)


__get

Parameters:
  • mixed $name
Signature:
public mixed __get (mixed $name)