Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Cloud_Infrastructure_InstanceList Class Reference

Public Member Functions

 __construct ($adapter, array $instances=null)
 Constructor.
 
 count ()
 Return number of instances.
 
 current ()
 Return the current element.
 
 key ()
 Return the key of the current element.
 
 next ()
 Move forward to next element.
 
 rewind ()
 Rewind the Iterator to the first element.
 
 valid ()
 Check if there is a current element after calls to rewind() or next()
 
 offsetExists ($offset)
 Whether the offset exists.
 
 offsetGet ($offset)
 Return value at given offset.
 
 offsetSet ($offset, $value)
 Throws exception because all values are read-only.
 
 offsetUnset ($offset)
 Throws exception because all values are read-only.
 

Protected Member Functions

 constructFromArray (array $list)
 Transforms the Array to array of Instances.
 
 addInstance (Zend_Cloud_Infrastructure_Instance $instance)
 Add an instance.
 

Protected Attributes

 $instances = array()
 
 $iteratorKey = 0
 
 $adapter
 

Constructor & Destructor Documentation

__construct (   $adapter,
array  $instances = null 
)

Constructor.

Parameters
Adapter$adapter
array$instances
Returns
void

Member Function Documentation

addInstance ( Zend_Cloud_Infrastructure_Instance  $instance)
protected

Add an instance.

Parameters
Instance
Returns
InstanceList
constructFromArray ( array  $list)
protected

Transforms the Array to array of Instances.

Parameters
array$list
Returns
void
count ( )

Return number of instances.

Implement Countable::count()

Returns
int
current ( )

Return the current element.

Implement Iterator::current()

Returns
Instance
int Iterator key ( )

Return the key of the current element.

Implement Iterator::key()

Returns
int
next ( )

Move forward to next element.

Implement Iterator::next()

Returns
void
offsetExists (   $offset)

Whether the offset exists.

Implement ArrayAccess::offsetExists()

Parameters
int$offset
Returns
bool
offsetGet (   $offset)

Return value at given offset.

Implement ArrayAccess::offsetGet()

Parameters
int$offset
Returns
Instance
Exceptions
Zend_Cloud_Infrastructure_Exception
offsetSet (   $offset,
  $value 
)

Throws exception because all values are read-only.

Implement ArrayAccess::offsetSet()

Parameters
int$offset
string$value
Exceptions
Zend_Cloud_Infrastructure_Exception
offsetUnset (   $offset)

Throws exception because all values are read-only.

Implement ArrayAccess::offsetUnset()

Parameters
int$offset
Exceptions
Zend_Cloud_Infrastructure_Exception
rewind ( )

Rewind the Iterator to the first element.

Implement Iterator::rewind()

Returns
void
valid ( )

Check if there is a current element after calls to rewind() or next()

Implement Iterator::valid()

Returns
bool

Member Data Documentation

$adapter
protected
$instances = array()
protected
$iteratorKey = 0
protected