API Documentation

Queue/Adapter/AdapterInterface.php

Interfaces
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Queue
subpackage
Adapter
version
$Id: AdapterInterface.php 20096 2010-01-06 02:05:09Z bkarwin $
Interfaces
Zend_Queue_Adapter_AdapterInterface

Description

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.

Zend_Queue_Adapter_AdapterInterface

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Queue
subpackage
Adapter
Methods
__construct
getQueue
setQueue
isExists
create
delete
getQueues
count
send
receive
deleteMessage
getOptions
getCapabilities
isSupported

Description

Interface for common queue operations

Methods

__construct

__construct( array|Zend_Config $options, Zend_Queue $queue = null ) : void

Constructor

Arguments
$options
arrayZend_Config
$queue
Zend_Queue
Details
visibility
public
final
false
static
false

count

count( Zend_Queue|null $queue = null ) : integer

Return the approximate number of messages in the queue

Arguments
$queue
Zend_Queuenull
Output
integer
Details
visibility
public
final
false
static
false

create

create( string $name, integer $timeout = null ) : boolean

Create 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.

Arguments
$name
string
Queue name
$timeout
integer
Default visibility timeout
Output
boolean
Details
visibility
public
final
false
static
false

delete

delete( string $name ) : boolean

Delete a queue and all of its messages

Return false if the queue is not found, true if the queue exists.

Arguments
$name
string
Queue name
Output
boolean
Details
visibility
public
final
false
static
false

deleteMessage

deleteMessage( Zend_Queue_Message $message ) : boolean

Delete a message from the queue

Return true if the message is deleted, false if the deletion is unsuccessful.

Arguments
$message
Zend_Queue_Message
Output
boolean
Details
visibility
public
final
false
static
false

getCapabilities

getCapabilities( ) : array

Return a list of queue capabilities functions

$array['function name'] = true or false true is supported, false is not supported.

Output
array
Details
visibility
public
final
false
static
false

getOptions

getOptions( ) : array

Returns the configuration options in this adapter.

Output
array
Details
visibility
public
final
false
static
false

getQueue

getQueue( ) : Zend_Queue

Retrieve queue instance

Output
Zend_Queue
Details
visibility
public
final
false
static
false

getQueues

getQueues( ) : array

Get an array of all available queues

Not all adapters support getQueues(); use isSupported('getQueues') to determine if the adapter supports this feature.

Output
array
Details
visibility
public
final
false
static
false

isExists

isExists( string $name ) : boolean

Does a queue already exist?

Use isSupported('isExists') to determine if an adapter can test for queue existance.

Arguments
$name
string
Queue name
Output
boolean
Details
visibility
public
final
false
static
false

isSupported

isSupported( string $name ) : boolean

Indicates if a function is supported or not.

Arguments
$name
string
Function name
Output
boolean
Details
visibility
public
final
false
static
false

receive

receive( integer|null $maxMessages = null, integer|null $timeout = null, Zend_Queue|null $queue = null ) : Zend_Queue_Message_Iterator

Get messages in the queue

Arguments
$maxMessages
integernull
Maximum number of messages to return
$timeout
integernull
Visibility timeout for these messages
$queue
Zend_Queuenull
Details
visibility
public
final
false
static
false

send

send( mixed $message, Zend_Queue|null $queue = null ) : Zend_Queue_Message

Send a message to the queue

Arguments
$message
mixed
Message to send to the active queue
$queue
Zend_Queuenull
Details
visibility
public
final
false
static
false

setQueue

setQueue( Zend_Queue $queue ) : Zend_Queue_Adapter_AdapterInterface

Set queue instnace

Arguments
$queue
Zend_Queue
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.