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 the Amazon Simple Queue Service (SQS)
CREATE_TIMEOUT_DEFAULT = '30'
Default timeout for createQueue() function
Details $_sqsApiVersion = '2009-02-01'The API version to use
Details $_sqsEndpoint = 'queue.amazonaws.com'HTTP end point for the Amazon SQS service
Details $_sqsSignatureMethod = 'HmacSHA256'Signature Encoding Method
Details $_sqsSignatureVersion = '2'Signature Version
Details__construct(
string $accessKey
=
null, string $secretKey
=
null, string $region
=
null
)
:
Constructor
Details_makeRequest(
$queue_url, string $action, array $params
=
array
)
:
SimpleXMLElementMake a request to Amazon SQS
Details_signParameters(
string $queue_url, $paramaters
)
:
stringComputes the RFC 2104-compliant HMAC signature for request parameters
This implements the Amazon Web Services signature, as per the following specification:
Sort all request parameters (including SignatureVersion and excluding Signature, the value of which is being created), ignoring case.
Iterate over the sorted list and append the parameter name (in its original case) and then its value. Do not URL-encode the parameter values before constructing this string. Do not use any separator characters when appending strings.
DetailsaddRequiredParameters(
string $queue_url, array $parameters
)
:
arrayAdds required authentication and version parameters to an array of parameters
The required parameters are: - AWSAccessKey - SignatureVersion - Timestamp - Version and - Signature
If a required parameter is already set in the $parameters array, it is overwritten.
Detailscount(
string $queue_url
)
:
integerReturn the approximate number of messages in the queue
Detailscreate(
string $queue_name, integer $timeout
=
null
)
:
string|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 $queue_url
)
:
booleanDelete a queue and all of it's messages
Returns false if the queue is not found, true if the queue exists
DetailsdeleteMessage(
string $queue_url, string $handle
)
:
booleanDelete a message from the queue
Returns true if the message is deleted, false if the deletion is unsuccessful.
DetailsgetAttribute(
string $queue_url, string $attribute
=
All
)
:
stringGet the attributes for the queue
DetailsgetQueues(
)
:
arrayGet an array of all available queues
Detailsreceive(
string $queue_url, integer $max_messages
=
null, integer $timeout
=
null
)
:
arrayGet messages in the queue
Detailssend(
string $queue_url, string $message
)
:
stringSend a message to the queue
Details