Class for using connecting to a Zend_Db-based queuing system
category | Zend |
---|---|
package | Zend_Queue |
subpackage | Adapter |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Queue_Adapter_AdapterAbstract |
__construct(array|\Zend_Config $options, \Zend_Queue|null $queue = null
) : void
$options is an array of key/value pairs or an instance of Zend_Config containing configuration options. These options are common to most adapters:
See the Zend_Queue Adapter Notes documentation for example configurations.
Some options are used on a case-by-case basis by adapters:
access_key => (string) Amazon AWS Access Key secret_key => (string) Amazon AWS Secret Key dbname => (string) The name of the database to user username => (string) Connect to the database as this username. password => (string) Password associated with the username. host => (string) What host to connect to, defaults to localhost port => (string) The port of the database
inherited_from | \Zend_Queue_Adapter_AdapterAbstract::__construct() |
---|
array
\Zend_Config
\Zend_Queue
null
__construct(array|\Zend_Config $options, \Zend_Queue $queue = null
) : void
$options is an array of key/value pairs or an instance of Zend_Config containing configuration options. These options are common to most adapters:
See the Zend_Queue Adapter Notes documentation for example configurations.
Some options are used on a case-by-case basis by adapters:
access_key => (string) Amazon AWS Access Key secret_key => (string) Amazon AWS Secret Key dbname => (string) The name of the database to user username => (string) Connect to the database as this username. password => (string) Password associated with the username. host => (string) What host to connect to, defaults to localhost port => (string) The port of the database
inherited_from | \Zend_Queue_Adapter_AdapterInterface::__construct() |
---|
\Zend_Queue_Exception |
---|
count(\Zend_Queue $queue = null
) : integer
\Zend_Queue
\Zend_Queue_Exception |
---|
integer
create(string $name, integer $timeout = null
) : boolean
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.
string
queue name
integer
default visibility timeout
\Zend_Queue_Exception |
- database error |
---|
boolean
delete(string $name) : boolean
Returns false if the queue is not found, true if the queue exists
string
queue name
\Zend_Queue_Exception |
- database error |
---|
boolean
deleteMessage(\Zend_Queue_Message $message) : boolean
Returns true if the message is deleted, false if the deletion is unsuccessful.
\Zend_Queue_Message
\Zend_Queue_Exception |
- database error |
---|
boolean
getCapabilities() : array
$array['function name'] = true or false true is supported, false is not supported.
array
getOptions() : array
inherited_from | \Zend_Queue_Adapter_AdapterInterface::getOptions() |
---|
array
getQueue() : \Zend_Queue | null
inherited_from | \Zend_Queue_Adapter_AdapterInterface::getQueue() |
---|
\Zend_Queue
null
getQueues()
isExists(string $name) : boolean
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.
string
\Zend_Queue_Exception |
---|
boolean
isSupported(string $name) : boolean
inherited_from | \Zend_Queue_Adapter_AdapterInterface::isSupported() |
---|
string
boolean
receive(integer $maxMessages= null
, integer $timeout= null
, \Zend_Queue $queue= null
) : \Zend_Queue_Message_Iterator
integer
Maximum number of messages to return
integer
Visibility timeout for these messages
\Zend_Queue
\Zend_Queue_Exception |
- database error |
---|
\Zend_Queue_Message_Iterator
send(string $message, \Zend_Queue $queue = null
) : \Zend_Queue_Message
string
Message to send to the active queue
\Zend_Queue
\Zend_Queue_Exception |
- database error |
---|
\Zend_Queue_Message
setQueue(\Zend_Queue $queue) : \Zend_Queue_Adapter_AdapterInterface
inherited_from | \Zend_Queue_Adapter_AdapterInterface::setQueue() |
---|
\Zend_Queue
\Zend_Queue_Adapter_AdapterInterface
_initDbAdapter() : \Zend_Db_Adapter_Abstract
Throws an exception if the adapter cannot connect to DB.
\Zend_Queue_Exception |
---|
\Zend_Db_Adapter_Abstract
getQueueId(string $name) : integer | null
Returns the queue's row identifier.
string
\Zend_Queue_Exception |
---|
integer
null
$_queue : \Zend_Queue_Adapter_Abstract
null
$_queueTable : \Zend_Queue_Adapter_Db_Queue
null
$_queues : array
array()
CREATE_TIMEOUT_DEFAULT = 30
RECEIVE_TIMEOUT_DEFAULT = 30