category Zend
package Zend_Queue
subpackage Message
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct(array $options = array()) : void

Parameters

$options

array

('queue', 'messageClass', 'data'=>array());

Store queue and data in serialized object

__sleep() : array

Returns

array

Setup to do on wakeup.

__wakeup() : void

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

Returns the number of elements in the collection.

count() : integer

Implements Countable::count()

Returns

integer

Return the current element.

current() : \Zend_Queue_Message

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

Returns

\Zend_Queue_Messagecurrent element from the collection

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

getQueue() : \Zend_Queue | null

Returns

\Zend_Queuenull

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

getQueueClass() : string

Returns

string

Return the identifying key of the current element.

key() : integer

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

Returns

integer

Move forward to next element.

next() : void

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

Rewind the Iterator to the first element.

rewind() : void

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

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

setQueue(\Zend_Queue_Adapter_AdapterInterface $queue) : boolean

Parameters

$queue

\Zend_Queue_Adapter_AdapterInterface

Exceptions

\Zend_Queue_Exception

Returns

boolean

Returns all data as an array.

toArray() : array

Used for debugging.

Returns

array

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

valid() : boolean

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

Returns

booleanFalse if there's nothing more to iterate over

 Properties

 

Connected is true if we have a reference to a live Zend_Queue_Adapter_AdapterInterface object.

$_connected : boolean

Default

true

This is false after the Message has been deserialized.

 

The data for the queue message

$_data : array

Default

array()
 

Zend_Queue_Message class name

$_messageClass : string

Default

'Zend_Queue_Message'
 

Iterator pointer.

$_pointer : integer

Default

0
 

Zend_Queue_Adapter_AdapterInterface parent class or instance

$_queue : \Zend_Queue_Adapter_AdapterInterface

Default

null
 

Name of the class of the Zend_Queue_Adapter_AdapterInterface object.

$_queueClass : string

Default

null