Zend Framework
1.12
|
Public Member Functions | |
__construct ($spec, $options=array()) | |
Constructor. | |
setOptions (array $options) | |
Set queue options. | |
setOption ($name, $value) | |
Set an individual configuration option. | |
getOptions () | |
Returns the configuration options for the queue. | |
hasOption ($name) | |
Determine if a requested option has been defined. | |
getOption ($name) | |
Retrieve a single option. | |
setAdapter ($adapter) | |
Set the adapter for this queue. | |
getAdapter () | |
Get the adapter for this queue. | |
setMessageClass ($className) | |
getMessageClass () | |
setMessageSetClass ($className) | |
getMessageSetClass () | |
getName () | |
Get the name of the queue. | |
createQueue ($name, $timeout=null) | |
Create a new queue. | |
deleteQueue () | |
Delete the queue this object is working on. | |
deleteMessage (Zend_Queue_Message $message) | |
Delete a message from the queue. | |
send ($message) | |
Send a message to the queue. | |
count () | |
Returns the approximate number of messages in the queue. | |
receive ($maxMessages=null, $timeout=null) | |
Return the first element in the queue. | |
getCapabilities () | |
Return a list of queue capabilities functions. | |
isSupported ($name) | |
Indicates if a function is supported or not. | |
getQueues () | |
Get an array of all available queues. | |
debugInfo () | |
returns a listing of Zend_Queue details. | |
Public Attributes | |
const | TIMEOUT = 'timeout' |
Use the TIMEOUT constant in the config of a Zend_Queue. | |
const | VISIBILITY_TIMEOUT = 30 |
Default visibility passed to count. | |
const | NAME = 'name' |
Use the NAME constant in the config of Zend_Queue. | |
Protected Member Functions | |
_setName ($name) | |
Set the name of the queue. | |
Protected Attributes | |
$_adapter = null | |
$_options = array() | |
$_messageClass = 'Zend_Queue_Message' | |
$_messageSetClass = 'Zend_Queue_Message_Iterator' | |
$_logger = null | |
__construct | ( | $spec, | |
$options = array() |
|||
) |
Constructor.
Can be called as $queue = new Zend_Queue($config);
string|Zend_Queue_Adapter|array|Zend_Config|null | String or adapter instance, or options array or Zend_Config instance | |
Zend_Config | array | $options | Zend_Config or a configuration array |
|
protected |
Set the name of the queue.
This is AN UNSUPPORTED FUNCTION
string | $name |
count | ( | ) |
Returns the approximate number of messages in the queue.
createQueue | ( | $name, | |
$timeout = null |
|||
) |
Create a new queue.
string | $name | queue name |
integer | $timeout | default visibility timeout |
Zend_Queue_Exception |
debugInfo | ( | ) |
deleteMessage | ( | Zend_Queue_Message | $message | ) |
Delete a message from the queue.
Returns true if the message is deleted, false if the deletion is unsuccessful.
Returns true if the adapter doesn't support message deletion.
Zend_Queue_Message | $message |
Zend_Queue_Exception |
deleteQueue | ( | ) |
Delete the queue this object is working on.
This queue is disabled, regardless of the outcome of the deletion of the queue, because the programmers intent is to disable this queue.
getAdapter | ( | ) |
Get the adapter for this queue.
getCapabilities | ( | ) |
Return a list of queue capabilities functions.
$array['function name'] = true or false true is supported, false is not supported.
string | $name |
getMessageClass | ( | ) |
getMessageSetClass | ( | ) |
getName | ( | ) |
Get the name of the queue.
Note: _setName() used to exist, but it caused confusion with createQueue Will evaluate later to see if we should add it back in.
getOption | ( | $name | ) |
Retrieve a single option.
string | $name |
getOptions | ( | ) |
Returns the configuration options for the queue.
getQueues | ( | ) |
hasOption | ( | $name | ) |
Determine if a requested option has been defined.
string | $name |
isSupported | ( | $name | ) |
Indicates if a function is supported or not.
string | $name |
receive | ( | $maxMessages = null , |
|
$timeout = null |
|||
) |
Return the first element in the queue.
integer | $maxMessages | |
integer | $timeout |
send | ( | $message | ) |
Send a message to the queue.
mixed | $message | message |
Zend_Queue_Exception |
setAdapter | ( | $adapter | ) |
Set the adapter for this queue.
string | Zend_Queue_Adapter_AdapterInterface | $adapter |
setMessageClass | ( | $className | ) |
string | $className |
setMessageSetClass | ( | $className | ) |
string | $className |
setOption | ( | $name, | |
$value | |||
) |
setOptions | ( | array | $options | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const NAME = 'name' |
Use the NAME constant in the config of Zend_Queue.
const TIMEOUT = 'timeout' |
Use the TIMEOUT constant in the config of a Zend_Queue.
const VISIBILITY_TIMEOUT = 30 |
Default visibility passed to count.