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

Public Member Functions

 __construct (array $options=array())
 Constructor.
 
 __sleep ()
 Store queue and data in serialized object.
 
 __wakeup ()
 Setup to do on wakeup.
 
 toArray ()
 Returns all data as an array.
 
 getQueue ()
 Returns the queue object, or null if this is disconnected message set.
 
 setQueue (Zend_Queue $queue)
 Set the queue object, to re-establish a live connection to the queue for a Message that has been de-serialized.
 
 getQueueClass ()
 Query the class name of the Queue object for which this Message was created.
 
 rewind ()
 Rewind the Iterator to the first element.
 
 current ()
 Return the current element.
 
 key ()
 Return the identifying key of the current element.
 
 next ()
 Move forward to next element.
 
 valid ()
 Check if there is a current element after calls to rewind() or next().
 
 count ()
 Returns the number of elements in the collection.
 

Protected Attributes

 $_data = array()
 
 $_connected = true
 
 $_queue = null
 
 $_queueClass = null
 
 $_messageClass = 'Zend_Queue_Message'
 
 $_pointer = 0
 

Constructor & Destructor Documentation

__construct ( array  $options = array())

Constructor.

Parameters
array$options('queue', 'messageClass', 'data'=>array());
Returns
void

Member Function Documentation

__sleep ( )

Store queue and data in serialized object.

Returns
array
__wakeup ( )

Setup to do on wakeup.

A de-serialized Message should not be assumed to have access to a live queue connection, so set _connected = false.

Returns
void
count ( )

Returns the number of elements in the collection.

Implements Countable::count()

Returns
integer
current ( )

Return the current element.

Similar to the current() function for arrays in PHP Required by interface Iterator.

Returns
Zend_Queue_Message current element from the collection
getQueue ( )

Returns the queue object, or null if this is disconnected message set.

Returns
Zend_Queue|null
getQueueClass ( )

Query the class name of the Queue object for which this Message was created.

Returns
string
key ( )

Return the identifying key of the current element.

Similar to the key() function for arrays in PHP. Required by interface Iterator.

Returns
integer
next ( )

Move forward to next element.

Similar to the next() function for arrays in PHP. Required by interface Iterator.

Returns
void
rewind ( )

Rewind the Iterator to the first element.

Similar to the reset() function for arrays in PHP. Required by interface Iterator.

Returns
void
setQueue ( Zend_Queue  $queue)

Set the queue object, to re-establish a live connection to the queue for a Message that has been de-serialized.

Parameters
Zend_Queue_Adapter_AdapterInterface$queue
Returns
boolean
Exceptions
Zend_Queue_Exception
toArray ( )

Returns all data as an array.

Used for debugging.

Returns
array
valid ( )

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

Used to check if we've iterated to the end of the collection. Required by interface Iterator.

Returns
bool False if there's nothing more to iterate over

Member Data Documentation

$_connected = true
protected
$_data = array()
protected
$_messageClass = 'Zend_Queue_Message'
protected
$_pointer = 0
protected
$_queue = null
protected
$_queueClass = null
protected