Queue/Message/PlatformJob.php

Show: PublicProtectedPrivateinherited
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: PlatformJob.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Queue_Message_PlatformJob

Package: Zend\Queue\Message
Class for managing Zend Platform JobQueue jobs via Zend_Queue
Parent(s)
\Zend_Queue_Message
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedboolean $_connected = true
inherited
Connected is true if we have a reference to a live Zend_Queue_Adapter_Abstract object.
Inherited from: \Zend_Queue_Message::$$_connected

This is false after the Message has been deserialized.

Default valuetrueDetails
Type
boolean
Inherited_from
\Zend_Queue_Message::$$_connected  
>VPropertyprotectedarray $_data = array()
inherited
The data for the queue message
Inherited from: \Zend_Queue_Message::$$_data
Default valuearray()Details
Type
array
Inherited_from
\Zend_Queue_Message::$$_data  
>VPropertyprotectedstring $_id = null
Job identifier
Default valuenullDetails
Type
string
>VPropertyprotected\ZendApi_Job $_job
Details
Type
\ZendApi_Job
>VPropertyprotected\Zend_Queue $_queue = null
inherited
Zend_Queue parent class or instance
Inherited from: \Zend_Queue_Message::$$_queue
Default valuenullDetails
Type
\Zend_Queue
Inherited_from
\Zend_Queue_Message::$$_queue  
>VPropertyprotectedstring $_queueClass = null
inherited
Name of the class of the Zend_Queue
Inherited from: \Zend_Queue_Message::$$_queueClass
Default valuenullDetails
Type
string
Inherited_from
\Zend_Queue_Message::$$_queueClass  

Methods

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

Constructor

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.

Parameters
NameTypeDescription
$optionsarray
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublic__get(string $key) : string
inherited

Retrieve message field value

Inherited from: \Zend_Queue_Message::__get()
Parameters
NameTypeDescription
$keystring

The user-specified key name.

Returns
TypeDescription
stringThe corresponding key value.
Throws
ExceptionDescription
\Zend_Queue_Exceptionif the $key is not a column in the message.
methodpublic__isset(string $key) : boolean
inherited

Test existence of message field

Inherited from: \Zend_Queue_Message::__isset()
Parameters
NameTypeDescription
$keystring

The column key.

Returns
TypeDescription
boolean
methodpublic__set(string $key, mixed $value) : void
inherited

Set message field value

Inherited from: \Zend_Queue_Message::__set()
Parameters
NameTypeDescription
$keystring

The message key.

$valuemixed

The value for the property.

Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublic__sleep() : array

Store queue and data in serialized object

Returns
TypeDescription
array
methodpublic__wakeup() : void
inherited

Setup to do on wakeup.

Inherited from: \Zend_Queue_Message::__wakeup()

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

methodprotected_setJobProperties() : void

Sets properties on the ZendApi_Job instance

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.

methodpublicgetJob() : \ZendApi_Job

Retrieve the internal ZendApi_Job instance

Returns
TypeDescription
\ZendApi_Job
methodpublicgetJobId() : string

Retrieve the job identifier

Returns
TypeDescription
string
methodpublicgetQueue() : \Zend_Queue | null
inherited

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

Inherited from: \Zend_Queue_Message::getQueue()
Returns
TypeDescription
\Zend_Queue | null
methodpublicgetQueueClass() : string

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

Returns
TypeDescription
string
methodpublicsetFromArray(array $data) : \Zend_Queue_Message
inherited

Sets all data in the row from an array.

Inherited from: \Zend_Queue_Message::setFromArray()
Parameters
NameTypeDescription
$dataarray
Returns
TypeDescription
\Zend_Queue_MessageProvides a fluent interface
methodpublicsetJobId(string $id) : \Zend_Queue_Message_PlatformJob

Set the job identifier

Used within Zend_Queue only.

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
\Zend_Queue_Message_PlatformJob
methodpublicsetQueue(\Zend_Queue $queue) : boolean
inherited

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

Inherited from: \Zend_Queue_Message::setQueue()
Parameters
NameTypeDescription
$queue\Zend_Queue
Returns
TypeDescription
boolean
methodpublictoArray() : array
inherited

Returns the column/value data as an array.

Inherited from: \Zend_Queue_Message::toArray()
Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.0.0a12.