API Documentation

Zend/Queue/Message/Iterator.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Queue  
Subpackage
Message  
Version
$Id: Iterator.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Queue_Message_Iterator

Package: Zend\Queue\Message

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

Properties

Propertyprotectedboolean  $_connected= 'true'

Connected 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
Propertyprotectedarray  $_data= 'array()'

The data for the queue message

Default valuearray()Details
Type
array
Propertyprotectedstring  $_messageClass= ''Zend_Queue_Message''

Zend_Queue_Message class name

Default value'Zend_Queue_Message'Details
Type
string
Propertyprotectedinteger  $_pointer= '0'

Iterator pointer.

Default value0Details
Type
integer
Propertyprotected\Zend_Queue_Adapter_AdapterInterface  $_queue= 'null'

Zend_Queue_Adapter_AdapterInterface parent class or instance

Default valuenullDetails
Type
\Zend_Queue_Adapter_AdapterInterface
Propertyprotectedstring  $_queueClass= 'null'

Name of the class of the Zend_Queue_Adapter_AdapterInterface object.

Default valuenullDetails
Type
string

Methods

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

Constructor

Parameters
Name Type Description
$options array

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

methodpublic__sleep( ) : array

Store queue and data in serialized object

Returns
Type Description
array
methodpublic__wakeup( ) : void

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.

methodpubliccount( ) : integer

Returns the number of elements in the collection.

Implements Countable::count()

Returns
Type Description
integer
methodpubliccurrent( ) : \Zend_Queue_Message

Return 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
methodpublicgetQueue( ) : \Zend_Queue|null

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

Returns
Type Description
\Zend_Queue|null
methodpublicgetQueueClass( ) : string

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

Returns
Type Description
string
methodpublickey( ) : integer

Return the identifying key of the current element.

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

Returns
Type Description
integer
methodpublicnext( ) : void

Move forward to next element.

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

methodpublicrewind( ) : void

Rewind the Iterator to the first element.

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

methodpublicsetQueue( \Zend_Queue_Adapter_AdapterInterface $queue ) : boolean

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

Parameters
Name Type Description
$queue \Zend_Queue_Adapter_AdapterInterface
Returns
Type Description
boolean
Throws
Exception Description
\Zend_Queue_Exception
methodpublictoArray( ) : array

Returns all data as an array.

Used for debugging.

Returns
Type Description
array
methodpublicvalid( ) : bool

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
Type Description
bool False if there's nothing more to iterate over
Documentation was generated by DocBlox 0.15.1.