Zend Framework
1.12
|
Public Member Functions | |
__construct ($host=Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE, $accountName=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri=false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null) | |
Creates a new Zend_Service_WindowsAzure_Storage_Queue instance. | |
queueExists ($queueName= '') | |
Check if a queue exists. | |
createQueue ($queueName= '', $metadata=array()) | |
Create queue. | |
createQueueIfNotExists ($queueName= '', $metadata=array()) | |
Create queue if it does not exist. | |
getQueue ($queueName= '') | |
Get queue. | |
getQueueMetadata ($queueName= '') | |
Get queue metadata. | |
setQueueMetadata ($queueName= '', $metadata=array()) | |
Set queue metadata. | |
deleteQueue ($queueName= '') | |
Delete queue. | |
listQueues ($prefix=null, $maxResults=null, $marker=null, $include=null, $currentResultCount=0) | |
List queues. | |
putMessage ($queueName= '', $message= '', $ttl=null) | |
Put message into queue. | |
getMessages ($queueName= '', $numOfMessages=1, $visibilityTimeout=null, $peek=false) | |
Get queue messages. | |
peekMessages ($queueName= '', $numOfMessages=1) | |
Peek queue messages. | |
hasMessages ($queueName= '') | |
Checks to see if a given queue has messages. | |
clearMessages ($queueName= '') | |
Clear queue messages. | |
deleteMessage ($queueName= '', Zend_Service_WindowsAzure_Storage_QueueMessage $message) | |
Delete queue message. | |
![]() | |
__construct ($host=self::URL_DEV_BLOB, $accountName=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri=false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null) | |
Creates a new Zend_Service_WindowsAzure_Storage instance. | |
setHttpClientChannel ($adapterInstance= 'Zend_Http_Client_Adapter_Proxy') | |
Set the HTTP client channel to use. | |
getHttpClientChannel () | |
Retrieve HTTP client channel. | |
setRetryPolicy (Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null) | |
Set retry policy to use when making requests. | |
setProxy ($useProxy=false, $proxyUrl= '', $proxyPort=80, $proxyCredentials= '') | |
Set proxy. | |
getAccountName () | |
Returns the Windows Azure account name. | |
getBaseUrl () | |
Get base URL for creating requests. | |
setCredentials (Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) | |
Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance. | |
getCredentials () | |
Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance. | |
isoDate ($timestamp=null) | |
Generate ISO 8601 compliant date string in UTC time zone. | |
Static Public Member Functions | |
static | isValidQueueName ($queueName= '') |
Is valid queue name? | |
![]() | |
static | urlencode ($value) |
URL encode function. | |
static | isValidMetadataName ($metadataName= '') |
Is valid metadata name? | |
static | createQueryStringFromArray ($queryString) |
Builds a query string from an array of elements. | |
Public Attributes | |
const | MAX_MESSAGE_SIZE = 8388608 |
Maximal message size (in bytes) | |
const | MAX_MESSAGE_TTL = 604800 |
Maximal message ttl (in seconds) | |
![]() | |
const | URL_DEV_BLOB = "127.0.0.1:10000" |
Development storage URLS. | |
const | URL_DEV_QUEUE = "127.0.0.1:10001" |
const | URL_DEV_TABLE = "127.0.0.1:10002" |
const | URL_CLOUD_BLOB = "blob.core.windows.net" |
Live storage URLS. | |
const | URL_CLOUD_QUEUE = "queue.core.windows.net" |
const | URL_CLOUD_TABLE = "table.core.windows.net" |
const | RESOURCE_UNKNOWN = "unknown" |
Resource types. | |
const | RESOURCE_CONTAINER = "c" |
const | RESOURCE_BLOB = "b" |
const | RESOURCE_TABLE = "t" |
const | RESOURCE_ENTITY = "e" |
const | RESOURCE_QUEUE = "q" |
const | PREFIX_PROPERTIES = "x-ms-prop-" |
HTTP header prefixes. | |
const | PREFIX_METADATA = "x-ms-meta-" |
const | PREFIX_STORAGE_HEADER = "x-ms-" |
Protected Member Functions | |
_getErrorMessage (Zend_Http_Response $response, $alternativeError= 'Unknown error.') | |
Get error message from Zend_Http_Response. | |
![]() | |
_performRequest ($path= '/', $queryString= '', $httpVerb=Zend_Http_Client::GET, $headers=array(), $forTableStorage=false, $rawData=null, $resourceType=Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ) | |
Perform request using Zend_Http_Client channel. | |
_parseResponse (Zend_Http_Response $response=null) | |
Parse result from Zend_Http_Response. | |
_generateMetadataHeaders ($metadata=array()) | |
Generate metadata headers. | |
_parseMetadataHeaders ($headers=array()) | |
Parse metadata headers. | |
_parseMetadataElement ($element=null) | |
Parse metadata XML. | |
Additional Inherited Members | |
![]() | |
$_apiVersion = '2009-09-19' | |
$_host = '' | |
$_accountName = '' | |
$_accountKey = '' | |
$_usePathStyleUri = false | |
$_credentials = null | |
$_retryPolicy = null | |
$_httpClientChannel = null | |
$_useProxy = false | |
$_proxyUrl = '' | |
$_proxyPort = 80 | |
$_proxyCredentials = '' | |
__construct | ( | $host = Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE , |
|
$accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT , |
|||
$accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY , |
|||
$usePathStyleUri = false , |
|||
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract | $retryPolicy = null |
||
) |
Creates a new Zend_Service_WindowsAzure_Storage_Queue instance.
string | $host | Storage host name |
string | $accountName | Account name for Windows Azure |
string | $accountKey | Account key for Windows Azure |
boolean | $usePathStyleUri | Use path-style URI's |
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract | $retryPolicy | Retry policy to use when making requests |
|
protected |
Get error message from Zend_Http_Response.
Zend_Http_Response | $response | Repsonse |
string | $alternativeError | Alternative error message |
clearMessages | ( | $queueName = '' | ) |
Clear queue messages.
string | $queueName | Queue name |
Zend_Service_WindowsAzure_Exception |
createQueue | ( | $queueName = '' , |
|
$metadata = array() |
|||
) |
Create queue.
string | $queueName | Queue name |
array | $metadata | Key/value pairs of meta data |
Zend_Service_WindowsAzure_Exception |
createQueueIfNotExists | ( | $queueName = '' , |
|
$metadata = array() |
|||
) |
Create queue if it does not exist.
string | $queueName | Queue name |
array | $metadata | Key/value pairs of meta data |
Zend_Service_WindowsAzure_Exception |
deleteMessage | ( | $queueName = '' , |
|
Zend_Service_WindowsAzure_Storage_QueueMessage | $message | ||
) |
Delete queue message.
string | $queueName | Queue name |
Zend_Service_WindowsAzure_Storage_QueueMessage | $message | Message to delete from queue. A message retrieved using "peekMessages" can NOT be deleted! |
Zend_Service_WindowsAzure_Exception |
deleteQueue | ( | $queueName = '' | ) |
getMessages | ( | $queueName = '' , |
|
$numOfMessages = 1 , |
|||
$visibilityTimeout = null , |
|||
$peek = false |
|||
) |
Get queue messages.
string | $queueName | Queue name |
string | $numOfMessages | 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. |
int | $visibilityTimeout | 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. |
string | $peek | Peek only? |
Zend_Service_WindowsAzure_Exception |
getQueue | ( | $queueName = '' | ) |
getQueueMetadata | ( | $queueName = '' | ) |
Get queue metadata.
string | $queueName | Queue name |
Zend_Service_WindowsAzure_Exception |
hasMessages | ( | $queueName = '' | ) |
Checks to see if a given queue has messages.
string | $queueName | Queue name |
Zend_Service_WindowsAzure_Exception |
|
static |
Is valid queue name?
string | $queueName | Queue name |
listQueues | ( | $prefix = null , |
|
$maxResults = null , |
|||
$marker = null , |
|||
$include = null , |
|||
$currentResultCount = 0 |
|||
) |
List queues.
string | $prefix | Optional. Filters the results to return only queues whose name begins with the specified prefix. |
int | $maxResults | 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) |
string | $marker | Optional string value that identifies the portion of the list to be returned with the next list operation. |
string | $include | Optional. Include this parameter to specify that the queue's metadata be returned as part of the response body. (allowed values: '', 'metadata') |
int | $currentResultCount | Current result count (internal use) |
Zend_Service_WindowsAzure_Exception |
peekMessages | ( | $queueName = '' , |
|
$numOfMessages = 1 |
|||
) |
Peek queue messages.
string | $queueName | Queue name |
string | $numOfMessages | 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. |
Zend_Service_WindowsAzure_Exception |
putMessage | ( | $queueName = '' , |
|
$message = '' , |
|||
$ttl = null |
|||
) |
Put message into queue.
string | $queueName | Queue name |
string | $message | Message |
int | $ttl | Message Time-To-Live (in seconds). Defaults to 7 days if the parameter is omitted. |
Zend_Service_WindowsAzure_Exception |
queueExists | ( | $queueName = '' | ) |
Check if a queue exists.
string | $queueName | Queue name |
setQueueMetadata | ( | $queueName = '' , |
|
$metadata = array() |
|||
) |
Set queue metadata.
Calling the Set Queue Metadata operation overwrites all existing metadata that is associated with the queue. It's not possible to modify an individual name/value pair.
string | $queueName | Queue name |
array | $metadata | Key/value pairs of meta data |
Zend_Service_WindowsAzure_Exception |
const MAX_MESSAGE_SIZE = 8388608 |
Maximal message size (in bytes)
const MAX_MESSAGE_TTL = 604800 |
Maximal message ttl (in seconds)