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 using connecting to a Zend_Cache-based queuing system
DEFAULT_HOST = '127.0.0.1'
Details DEFAULT_PORT = '22201'
Details EOL = '\r\n'
DetailsMemcache $_cache = 'null'
Detailsstring $_host = 'null'
Detailsinteger $_port = 'null'
Detailsresource $_socket = 'null'
Details__construct(
array|Zend_Config $options, null|Zend_Queue $queue
=
null
)
:
voidConstructor
Details__destruct(
)
:
voidDestructor
Details_sendCommand(
string $command, array $terminator, boolean $include_term
=
false
)
:
arraysends a command to MemcacheQ
The memcache functions by php cannot handle all types of requests supported by MemcacheQ Non-standard requests are handled by this function.
Detailscount(
Zend_Queue $queue
=
null
)
:
integerReturn the approximate number of messages in the queue
Detailscreate(
string $name, integer $timeout
=
null
)
:
booleanCreate a new queue
Visibility timeout is how long a message is left in the queue "invisible" to other readers. If the message is acknowleged (deleted) before the timeout, then the message is deleted. However, if the timeout expires then the message will be made available to other queue readers.
Detailsdelete(
string $name
)
:
booleanDelete a queue and all of it's messages
Returns false if the queue is not found, true if the queue exists
DetailsdeleteMessage(
Zend_Queue_Message $message
)
:
booleanDelete a message from the queue
Returns true if the message is deleted, false if the deletion is unsuccessful.
DetailsgetCapabilities(
)
:
arrayReturn a list of queue capabilities functions
$array['function name'] = true or false true is supported, false is not supported.
DetailsgetQueues(
)
:
arrayGet an array of all available queues
Not all adapters support getQueues(), use isSupported('getQueues') to determine if the adapter supports this feature.
DetailsisExists(
string $name
)
:
booleanDoes a queue already exist?
Throws an exception if the adapter cannot determine if a queue exists. use isSupported('isExists') to determine if an adapter can test for queue existance.
Detailsreceive(
integer $maxMessages
=
null, integer $timeout
=
null, Zend_Queue $queue
=
null
)
:
Zend_Queue_Message_IteratorGet messages in the queue
Detailssend(
string $message, Zend_Queue $queue
=
null
)
:
Zend_Queue_MessageSend a message to the queue
Details