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.
Class for connecting to queues performing common operations.
TIMEOUT = 'timeout'
Use the TIMEOUT constant in the config of a Zend_Queue
Details VISIBILITY_TIMEOUT = '30'
Default visibility passed to count
Details NAME = 'name'
Use the NAME constant in the config of Zend_Queue
DetailsZend_Queue_Adapter_AdapterInterface $_adapter = 'null'
DetailsZend_Log $_logger = 'null'
Detailsstring $_messageClass = 'Zend_Queue_Message'Zend_Queue_Message class
Detailsstring $_messageSetClass = 'Zend_Queue_Message_Iterator'Zend_Queue_Message_Iterator class
Detailsarray $_options = 'array'User-provided configuration
Details__construct(
string|Zend_Queue_Adapter|array|Zend_Config|null $spec, Zend_Config|array $options
=
array
)
:
voidConstructor
Can be called as $queue = new Zend_Queue($config); - or - $queue = new Zend_Queue('array', $config); - or - $queue = new Zend_Queue(null, $config); // Zend_Queue->createQueue();
Details_setName(
string $name
)
:
Zend_Queue|falseSet the name of the queue
This is AN UNSUPPORTED FUNCTION
Detailscount(
)
:
integerReturns the approximate number of messages in the queue
DetailscreateQueue(
string $name, integer $timeout
=
null
)
:
Zend_Queue|falseCreate a new queue
DetailsdebugInfo(
)
:
arrayreturns a listing of Zend_Queue details.
useful for debugging
DetailsdeleteMessage(
Zend_Queue_Message $message
)
:
booleanDelete 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.
DetailsdeleteQueue(
)
:
booleanDelete 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.
DetailsgetAdapter(
)
:
Zend_Queue_Adapter_AdapterInterfaceGet the adapter for this queue
DetailsgetCapabilities(
)
:
arrayReturn a list of queue capabilities functions
$array['function name'] = true or false true is supported, false is not supported.
DetailsgetMessageClass(
)
:
string
DetailsgetMessageSetClass(
)
:
string
DetailsgetName(
)
:
stringGet 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.
DetailsgetOption(
string $name
)
:
null|mixedRetrieve a single option
DetailsgetOptions(
)
:
arrayReturns the configuration options for the queue
DetailsgetQueues(
)
:
arrayGet an array of all available queues
DetailshasOption(
string $name
)
:
boolDetermine if a requested option has been defined
DetailsisSupported(
string $name
)
:
booleanIndicates if a function is supported or not.
Detailsreceive(
integer $maxMessages
=
null, integer $timeout
=
null
)
:
Zend_Queue_Message_IteratorReturn the first element in the queue
Detailssend(
mixed $message
)
:
Zend_Queue_MessageSend a message to the queue
DetailssetAdapter(
string|Zend_Queue_Adapter_AdapterInterface $adapter
)
:
Zend_QueueSet the adapter for this queue
DetailssetMessageClass(
string $className
)
:
Zend_Queue
DetailssetMessageSetClass(
string $className
)
:
Zend_Queue
DetailssetOption(
string $name, mixed $value
)
:
Zend_QueueSet an individual configuration option
DetailssetOptions(
array $options
)
:
Zend_QueueSet queue options
Details