Class for managing Zend Platform JobQueue jobs via Zend_Queue

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

 Methods

Constructor

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

The constructor should be an array of options.

If the option 'data' is provided, and is an instance of ZendApi_Job, that object will be used as the internal job; if that option is not a ZendApi_Job instance, an exception will be thrown.

Alternately, you may specify the 'script' parameter, which should be a JobQueue script the job will request. A new ZendApi_Job object will then be created using that script and any options you provide.

inherited_from \Zend_Queue_Message::__construct()

Parameters

$options

array

Exceptions

\Zend_Queue_Exception

Constructor

__construct(array $options = array()
Inherited

Parameters

$options

array

Exceptions

\Zend_Queue_Exception

Retrieve message field value

__get(string $key) : string
Inherited

Parameters

$key

string

The user-specified key name.

Exceptions

\Zend_Queue_Exception if the $key is not a column in the message.

Returns

stringThe corresponding key value.

Test existence of message field

__isset(string $key) : boolean
Inherited

Parameters

$key

string

The column key.

Returns

boolean

Set message field value

__set(string $key, mixed $value) : void
Inherited

Parameters

$key

string

The message key.

$value

mixed

The value for the property.

Exceptions

\Zend_Queue_Exception

Store queue and data in serialized object

__sleep() : array
inherited_from \Zend_Queue_Message::__sleep()

Returns

array

Store queue and data in serialized object

__sleep() : array
Inherited

Returns

array

Setup to do on wakeup.

__wakeup() : void
Inherited

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

Retrieve the internal ZendApi_Job instance

getJob() : \ZendApi_Job

Returns

\ZendApi_Job

Retrieve the job identifier

getJobId() : string

Returns

string

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

getQueue() : \Zend_Queue | null
Inherited

Returns

\Zend_Queuenull

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

getQueueClass() : string
inherited_from \Zend_Queue_Message::getQueueClass()

Returns

string

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

getQueueClass() : string
Inherited

Returns

string

Sets all data in the row from an array.

setFromArray(array $data) : \Zend_Queue_Message
Inherited

Parameters

$data

array

Returns

\Zend_Queue_MessageProvides a fluent interface

Set the job identifier

setJobId(string $id) : \Zend_Queue_Message_PlatformJob

Used within Zend_Queue only.

Parameters

$id

string

Returns

\Zend_Queue_Message_PlatformJob

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

setQueue(\Zend_Queue $queue) : boolean
Inherited

Parameters

$queue

\Zend_Queue

Returns

boolean

Returns the column/value data as an array.

toArray() : array
Inherited

Returns

array

Sets properties on the ZendApi_Job instance

_setJobProperties() : void

Any options in the \$_data array will be checked. Those matching options in ZendApi_Job will be used to set those options in that instance.

 Properties

 

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

$_connected : boolean

Default

true

This is false after the Message has been deserialized.

 

The data for the queue message

$_data : array

Default

array()
 

Job identifier

$_id : string

Default

null
 

$_job

$_job : \ZendApi_Job

Default

 

Zend_Queue parent class or instance

$_queue : \Zend_Queue

Default

null
 

Name of the class of the Zend_Queue

$_queueClass : string

Default

null