Queue/Message/PlatformJob.php
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
- 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

boolean $_connected = trueThis is false after the Message has been deserialized.
trueDetails- Type
- boolean
- Inherited_from
- \Zend_Queue_Message::$$_connected

array $_data = array()array()Details- Type
- array
- Inherited_from
- \Zend_Queue_Message::$$_data

\Zend_Queue $_queue = nullnullDetails- Type
- \Zend_Queue
- Inherited_from
- \Zend_Queue_Message::$$_queue

string $_queueClass = nullnullDetails- Type
- string
- Inherited_from
- \Zend_Queue_Message::$$_queueClass
Methods

__construct(array $options = array()) : voidConstructor
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.
| Name | Type | Description |
|---|---|---|
| $options | array |
| Exception | Description |
|---|---|
| \Zend_Queue_Exception |

__get(string $key) : string| Name | Type | Description |
|---|---|---|
| $key | string | The user-specified key name. |
| Type | Description |
|---|---|
| string | The corresponding key value. |
| Exception | Description |
|---|---|
| \Zend_Queue_Exception | if the $key is not a column in the message. |

__isset(string $key) : boolean| Name | Type | Description |
|---|---|---|
| $key | string | The column key. |
| Type | Description |
|---|---|
| boolean |

__set(string $key, mixed $value) : void| Name | Type | Description |
|---|---|---|
| $key | string | The message key. |
| $value | mixed | The value for the property. |
| Exception | Description |
|---|---|
| \Zend_Queue_Exception |

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

_setJobProperties() : voidSets 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.

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

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

setFromArray(array $data) : \Zend_Queue_Message| Name | Type | Description |
|---|---|---|
| $data | array |
| Type | Description |
|---|---|
| \Zend_Queue_Message | Provides a fluent interface |

setJobId(string $id) : \Zend_Queue_Message_PlatformJobSet the job identifier
Used within Zend_Queue only.
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| \Zend_Queue_Message_PlatformJob |

setQueue(\Zend_Queue $queue) : booleanSet 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()| Name | Type | Description |
|---|---|---|
| $queue | \Zend_Queue |
| Type | Description |
|---|---|
| boolean |