Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Queue_Adapter_PlatformJobQueue Class Reference

Public Member Functions

 __construct ($options, Zend_Queue $queue=null)
 Constructor.
 
 isExists ($name)
 Does a queue already exist?
 
 create ($name, $timeout=null)
 Create a new queue.
 
 delete ($name)
 Delete a queue and all of its messages.
 
 getQueues ()
 Get an array of all available queues.
 
 count (Zend_Queue $queue=null)
 Return the approximate number of messages in the queue.
 
 send ($message, Zend_Queue $queue=null)
 Send a message to the queue.
 
 receive ($maxMessages=null, $timeout=null, Zend_Queue $queue=null)
 Get messages in the queue.
 
 deleteMessage (Zend_Queue_Message $message)
 Delete a message from the queue.
 
 isJobIdExist ($id)
 
 getCapabilities ()
 Return a list of queue capabilities functions.
 
 __sleep ()
 Serialize.
 
 __wakeup ()
 Unserialize.
 
- Public Member Functions inherited from Zend_Queue_Adapter_AdapterAbstract
 __construct ($options, Zend_Queue $queue=null)
 Constructor.
 
 getQueue ()
 get the Zend_Queue class that is attached to this object
 
 setQueue (Zend_Queue $queue)
 set the Zend_Queue class for this object
 
 getOptions ()
 Returns the configuration options in this adapter.
 
 isSupported ($name)
 Indicates if a function is supported or not.
 

Protected Attributes

 $_zendQueue
 
- Protected Attributes inherited from Zend_Queue_Adapter_AdapterAbstract
 $_options = array()
 
 $_queues = array()
 
 $_queue = null
 

Additional Inherited Members

- Public Attributes inherited from Zend_Queue_Adapter_AdapterAbstract
const CREATE_TIMEOUT_DEFAULT = 30
 Default timeout for createQueue() function.
 
const RECEIVE_TIMEOUT_DEFAULT = 30
 Default timeout for recieve() function.
 

Constructor & Destructor Documentation

__construct (   $options,
Zend_Queue  $queue = null 
)

Constructor.

Parameters
array | Zend_Config$options
Zend_Queue | null$queue
Returns
void

Implements Zend_Queue_Adapter_AdapterInterface.

Member Function Documentation

__sleep ( )

Serialize.

Returns
array
__wakeup ( )

Unserialize.

Returns
void
count ( Zend_Queue  $queue = null)

Return the approximate number of messages in the queue.

Parameters
Zend_Queue | null$queue
Returns
integer

Implements Zend_Queue_Adapter_AdapterInterface.

create (   $name,
  $timeout = null 
)

Create a new queue.

Parameters
string$namequeue name
integer$timeoutdefault visibility timeout
Returns
void
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Adapter_AdapterInterface.

delete (   $name)

Delete a queue and all of its messages.

Parameters
string$namequeue name
Returns
void
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Adapter_AdapterInterface.

deleteMessage ( Zend_Queue_Message  $message)

Delete a message from the queue.

Returns true if the message is deleted, false if the deletion is unsuccessful.

Parameters
Zend_Queue_Message$message
Returns
boolean
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Adapter_AdapterInterface.

getCapabilities ( )

Return a list of queue capabilities functions.

$array['function name'] = true or false true is supported, false is not supported.

Parameters
string$name
Returns
array

Implements Zend_Queue_Adapter_AdapterInterface.

getQueues ( )

Get an array of all available queues.

Returns
void
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Adapter_AdapterInterface.

isExists (   $name)

Does a queue already exist?

Parameters
string$name
Returns
boolean
Exceptions
Zend_Queue_Exception(not supported)

Implements Zend_Queue_Adapter_AdapterInterface.

isJobIdExist (   $id)
receive (   $maxMessages = null,
  $timeout = null,
Zend_Queue  $queue = null 
)

Get messages in the queue.

Parameters
integer$maxMessagesMaximum number of messages to return
integer$timeoutIgnored
Zend_Queue$queueNot supported
Exceptions
Zend_Queue_Exception
Returns
ArrayIterator

Implements Zend_Queue_Adapter_AdapterInterface.

send (   $message,
Zend_Queue  $queue = null 
)

Send a message to the queue.

Parameters
array  |  ZendAPI_job$messageMessage to send to the active queue
Zend_Queue$queueNot supported
Returns
Zend_Queue_Message
Exceptions
Zend_Queue_Exception

Implements Zend_Queue_Adapter_AdapterInterface.

Member Data Documentation

$_zendQueue
protected