Service/WindowsAzure/Storage/Queue.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- name_todo
- Package
- Zend_Service_WindowsAzure
- Subpackage
- Storage
- Version
- $Id$
\Zend_Service_WindowsAzure_Storage_Queue
- Parent(s)
- \Zend_Service_WindowsAzure_Storage
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Methods

__construct(string $host = \Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE, string $accountName = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, string $accountKey = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, boolean $usePathStyleUri = false, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : voidCreates a new Zend_Service_WindowsAzure_Storage_Queue instance
| Name | Type | Description |
|---|---|---|
| $host | string | Storage host name |
| $accountName | string | Account name for Windows Azure |
| $accountKey | string | Account key for Windows Azure |
| $usePathStyleUri | boolean | Use path-style URI's |
| $retryPolicy | \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract | Retry policy to use when making requests |

_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : stringGet error message from Zend_Http_Response
| Name | Type | Description |
|---|---|---|
| $response | \Zend_Http_Response | Repsonse |
| $alternativeError | string | Alternative error message |
| Type | Description |
|---|---|
| string |

clearMessages(string $queueName = '') : voidClear queue messages
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

createQueue(string $queueName = '', array $metadata = array()) : objectCreate queue
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $metadata | array | Key/value pairs of meta data |
| Type | Description |
|---|---|
| object | Queue properties |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

createQueueIfNotExists(string $queueName = '', array $metadata = array()) : voidCreate queue if it does not exist
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $metadata | array | Key/value pairs of meta data |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

deleteMessage(string $queueName = '', \Zend_Service_WindowsAzure_Storage_QueueMessage $message) : voidDelete queue message
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $message | \Zend_Service_WindowsAzure_Storage_QueueMessage | Message to delete from queue. A message retrieved using "peekMessages" can NOT be deleted! |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

deleteQueue(string $queueName = '') : voidDelete queue
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

getMessages(string $queueName = '', string $numOfMessages = 1, int $visibilityTimeout = null, string $peek = false) : arrayGet queue messages
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $numOfMessages | string | Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. By default, a single message is retrieved from the queue with this operation. |
| $visibilityTimeout | int | Optional. An integer value that specifies the message's visibility timeout in seconds. The maximum value is 2 hours. The default message visibility timeout is 30 seconds. |
| $peek | string | Peek only? |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

getQueue(string $queueName = '') : \Zend_Service_WindowsAzure_Storage_QueueInstanceGet queue
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Type | Description |
|---|---|
| \Zend_Service_WindowsAzure_Storage_QueueInstance |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

getQueueMetadata(string $queueName = '') : arrayGet queue metadata
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Type | Description |
|---|---|
| array | Key/value pairs of meta data |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

hasMessages(string $queueName = '') : booleanChecks to see if a given queue has messages
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

isValidQueueName(string $queueName = '') : booleanIs valid queue name?
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Type | Description |
|---|---|
| boolean |

listQueues(string $prefix = null, int $maxResults = null, string $marker = null, string $include = null, int $currentResultCount = 0) : arrayList queues
| Name | Type | Description |
|---|---|---|
| $prefix | string | Optional. Filters the results to return only queues whose name begins with the specified prefix. |
| $maxResults | int | Optional. Specifies the maximum number of queues to return per call to Azure storage. This does NOT affect list size returned by this function. (maximum: 5000) |
| $marker | string | Optional string value that identifies the portion of the list to be returned with the next list operation. |
| $include | string | Optional. Include this parameter to specify that the queue's metadata be returned as part of the response body. (allowed values: '', 'metadata') |
| $currentResultCount | int | Current result count (internal use) |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

peekMessages(string $queueName = '', string $numOfMessages = 1) : arrayPeek queue messages
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $numOfMessages | string | Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. By default, a single message is retrieved from the queue with this operation. |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

putMessage(string $queueName = '', string $message = '', int $ttl = null) : voidPut message into queue
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $message | string | Message |
| $ttl | int | Message Time-To-Live (in seconds). Defaults to 7 days if the parameter is omitted. |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |

queueExists(string $queueName = '') : booleanCheck if a queue exists
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| Type | Description |
|---|---|
| boolean |

setQueueMetadata(string $queueName = '', array $metadata = array()) : voidSet queue metadata
| Name | Type | Description |
|---|---|---|
| $queueName | string | Queue name |
| $metadata | array | Key/value pairs of meta data |
| Exception | Description |
|---|---|
| \Zend_Service_WindowsAzure_Exception |