Services_Amazon_SQS
[ class tree: Services_Amazon_SQS ] [ index: Services_Amazon_SQS ] [ all elements ]

Class: Services_Amazon_SQS_QueueManager

Source Location: /Services_Amazon_SQS-0.3.0/Services/Amazon/SQS/QueueManager.php

Class Overview

Services_Amazon_SQS
   |
   --Services_Amazon_SQS_QueueManager

Class for creating, managing, and deleting Amazon Simple Queue Service (SQS) queues


Author(s):

Copyright:

  • 2008 Mike Brittain, 2008 silverorange

Methods


Inherited Variables

Inherited Methods

Class: Services_Amazon_SQS

Services_Amazon_SQS::__construct()
Creates a new SQS client
Services_Amazon_SQS::addRequiredParameters()
Adds required authentication and version parameters to an array of parameters
Services_Amazon_SQS::getRequestBackoffTime()
Gets the number of milliseconds to wait before the next reqeust when performing exponential backoff
Services_Amazon_SQS::isValidPermissionLabel()
Gets whether or not a permission label is valid
Services_Amazon_SQS::isValidVisibilityTimeout()
Gets whether or not a visibility timeout is valid
Services_Amazon_SQS::sendRequest()
Sends a HTTP request to the queue service
Services_Amazon_SQS::setMaximumRetries()
Sets the maximum number of retries to make when encountering internal errors on SQS
Services_Amazon_SQS::setRequest()
Sets the HTTP request object to use
Services_Amazon_SQS::signParameters()
Signs an array of request parameters using the Amazon Web Services Signature Version 2 signing method

Class Details

[line 63]
Class for creating, managing, and deleting Amazon Simple Queue Service (SQS) queues


[ Top ]


Method Detail

createQueue   [line 134]

Services_Amazon_SQS_Queue createQueue( string $name, [integer $timeout = null])

Creates a new queue for the current account
  • Return: the new queue object or false if the queue could not be created.
  • Throws: Services_Amazon_SQS_InvalidQueueException if the queue name is not a valid queue name, if the queue was recently deleted or if the queue already exists and the visibility timeout value differs from the value on the existing queue.
  • Throws: Services_Amazon_SQS_HttpException if the HTTP request fails.
  • Throws: Services_Amazon_SQS_InvalidTimeoutException if the provided $timeout is not in the valid range.
  • Throws: Services_Amazon_SQS_ErrorException if one or more errors are returned by Amazon.
  • Access: public

Parameters:

string   $name   —  the queue name.
integer   $timeout   —  optional. Timeout for message visibility.

[ Top ]

deleteQueue   [line 207]

void deleteQueue( Services_Amazon_SQS_Queue|string $queue)

Deletes a queue

All existing messages in the queue will be lost.

  • Throws: Services_Amazon_SQS_HttpException if the HTTP request fails.
  • Throws: Services_Amazon_SQS_ErrorException if one or more errors are returned by Amazon.
  • Access: public

Parameters:

Services_Amazon_SQS_Queue|string   $queue   —  either a queue object or the queue URL of the queue to be deleted.

[ Top ]

isValidQueueName   [line 236]

boolean isValidQueueName( string $name)

Gets whether or not a queue name is valid for Amazon SQS

Amazon SQS queue names must conform to the following rules:

  • must be 1 to 80 ASCII characters
  • must contain only alphanumeric characters, dashes (-), and underscores (_).

  • Return: true if the provided queue name is a valid SQS queue name, otherwise false.
  • Access: protected

Parameters:

string   $name   —  the queue name to check.

[ Top ]

listQueues   [line 81]

array listQueues( [string $prefix = null])

Gets a list of SQS queues for the current account
  • Return: an array of Services_Amazon_SQS_Queue objects.
  • Throws: Services_Amazon_SQS_HttpException if the HTTP request fails.
  • Throws: Services_Amazon_SQS_ErrorException if one or more errors are returned by Amazon.
  • Access: public

Parameters:

string   $prefix   —  optional. Only list queues whose name begins with the given prefix. If not specified, all queues for the account are returned.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:35:28 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.