Queue/Message/Iterator.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Queue
- Subpackage
- Message
- Version
- $Id$
\Zend_Queue_Message_Iterator
Package: Zend_Queue\Message












- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

boolean $_connected = trueConnected is true if we have a reference to a live
Zend_Queue_Adapter_AdapterInterface object.
This is false after the Message has been deserialized.
Default valuetrueDetails- Type
- boolean

string $_messageClass = 'Zend_Queue_Message'Zend_Queue_Message class name
Default value
'Zend_Queue_Message'Details- Type
- string

\Zend_Queue_Adapter_AdapterInterface $_queue = nullZend_Queue_Adapter_AdapterInterface parent class or instance
Default value
nullDetailsMethods

__construct(array $options = array()) : voidConstructor
Parameters
| Name | Type | Description |
|---|---|---|
| $options | array | ('queue', 'messageClass', 'data'=>array()); |

__wakeup() : voidSetup to do on wakeup.
A de-serialized Message should not be assumed to have access to a live
queue connection, so set _connected = false.

count() : integerReturns the number of elements in the collection.
Implements Countable::count()
Returns| Type | Description |
|---|---|
| integer |

current() : \Zend_Queue_MessageReturn the current element.
Similar to the current() function for arrays in PHP
Required by interface Iterator.
Returns| Type | Description |
|---|---|
| \Zend_Queue_Message | current element from the collection |

getQueue() : \Zend_Queue | nullReturns the queue object, or null if this is disconnected message set
Returns
| Type | Description |
|---|---|
| \Zend_Queue | null |

getQueueClass() : stringQuery the class name of the Queue object for which this Message was created.
Returns
| Type | Description |
|---|---|
| string |

key() : integerReturn the identifying key of the current element.
Similar to the key() function for arrays in PHP.
Required by interface Iterator.
Returns| Type | Description |
|---|---|
| integer |

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

rewind() : voidRewind the Iterator to the first element.
Similar to the reset() function for arrays in PHP.
Required by interface Iterator.

setQueue(\Zend_Queue_Adapter_AdapterInterface $queue) : booleanSet the queue object, to re-establish a live connection to the queue for a Message that has been de-serialized.
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $queue | \Zend_Queue_Adapter_AdapterInterface |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Queue_Exception |