API Documentation

Queue/Message/PlatformJob.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Queue  
subpackage
Message  
version
$Id: PlatformJob.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Queue_Message_PlatformJob

Class for managing Zend Platform JobQueue jobs via Zend_Queue

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

Properties

Propertyprotectedstring  $_id= 'null'

Job identifier

Default valuenullDetails
Type
string
Propertyprotected\ZendApi_Job  $_job= ''

Details
Type
\ZendApi_Job

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
Name Type Description
$options array
Throws
Exception Description
\Zend_Queue_Exception
methodpublic__get( string $key ) : string

Retrieve message field value

Inherited from: \Zend_Queue_Message::__get()
Parameters
Name Type Description
$key string

The user-specified key name.

Returns
Type Description
string The corresponding key value.
Throws
Exception Description
\Zend_Queue_Exception if the $key is not a column in the message.
methodpublic__isset( string $key ) : boolean

Test existence of message field

Inherited from: \Zend_Queue_Message::__isset()
Parameters
Name Type Description
$key string The column key.
Returns
Type Description
boolean
methodpublic__set( string $key, mixed $value ) : void

Set message field value

Inherited from: \Zend_Queue_Message::__set()
Parameters
Name Type Description
$key string The message key.
$value mixed The value for the property.
Throws
Exception Description
\Zend_Queue_Exception
methodpublic__sleep( ) : array

Store queue and data in serialized object

Returns
Type Description
array
methodpublic__wakeup( ) : void

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 {@link $_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
Type Description
\ZendApi_Job
methodpublicgetJobId( ) : string

Retrieve the job identifier

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

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

Inherited from: \Zend_Queue_Message::getQueue()
Returns
Type Description
\Zend_Queuenull
methodpublicgetQueueClass( ) : string

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

Returns
Type Description
string
methodpublicsetFromArray( array $data ) : \Zend_Queue_Message

Sets all data in the row from an array.

Inherited from: \Zend_Queue_Message::setFromArray()
Parameters
Name Type Description
$data array
Returns
Type Description
\Zend_Queue_Message Provides a fluent interface
methodpublicsetJobId( string $id ) : \Zend_Queue_Message_PlatformJob

Set the job identifier

Used within Zend_Queue only.

Parameters
Name Type Description
$id string
Returns
Type Description
\Zend_Queue_Message_PlatformJob
methodpublicsetQueue( \Zend_Queue $queue ) : boolean

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
Name Type Description
$queue \Zend_Queue
Returns
Type Description
boolean
methodpublictoArray( ) : array

Returns the column/value data as an array.

Inherited from: \Zend_Queue_Message::toArray()
Returns
Type Description
array
Documentation was generated by DocBlox 0.13.3.