Queue.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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Queue
- Version
- $Id: Queue.php 25024 2012-07-30 15:08:15Z rob $
Package: Zend\QueueClass for connecting to queues performing common operations.
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties



string $_messageSetClass = 'Zend_Queue_Message_Iterator'Zend_Queue_Message_Iterator class
Default value'Zend_Queue_Message_Iterator'Details- Type
- string



array $_options = array()User-provided configuration
Default valuearray()Details- Type
- array
Methods



__construct(string | \Zend_Queue_Adapter | array | \Zend_Config | null $spec, \Zend_Config | array $options = array()) : voidCan 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();
Parameters| Name | Type | Description |
|---|
| $spec | string | \Zend_Queue_Adapter | array | \Zend_Config | null | String or adapter instance, or options array or Zend_Config instance |
|---|
| $options | \Zend_Config | array | Zend_Config or a configuration array |
|---|



_setName(string $name) : \Zend_Queue | falseSet the name of the queue
This is AN UNSUPPORTED FUNCTION
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
Returns| Type | Description |
|---|
| \Zend_Queue | false | Provides a fluent interface |



createQueue(string $name, integer $timeout = null) : \Zend_Queue | falseParameters| Name | Type | Description |
|---|
| $name | string | queue name |
|---|
| $timeout | integer | default visibility timeout |
|---|
ReturnsThrows 


deleteMessage(\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.
ParametersReturnsThrows


deleteQueue() : 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.
Returns


getCapabilities() : arrayReturn a list of queue capabilities functions
$array['function name'] = true or false
true is supported, false is not supported.
Returns


getName() : 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.
Returns


hasOption(string $name) : boolDetermine if a requested option has been defined
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
Returns 


isSupported(string $name) : booleanIndicates if a function is supported or not.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
Returns 


receive(integer $maxMessages = null, integer $timeout = null) : \Zend_Queue_Message_IteratorReturn the first element in the queue
Parameters| Name | Type | Description |
|---|
| $maxMessages | integer | |
|---|
| $timeout | integer | |
|---|
Returns 


send(mixed $message) : \Zend_Queue_MessageSend a message to the queue
Parameters| Name | Type | Description |
|---|
| $message | mixed | message |
|---|
ReturnsThrows 


setOption(string $name, mixed $value) : \Zend_QueueSet an individual configuration option
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | mixed | |
|---|
Returns