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

Class: Microsoft_WindowsAzure_Storage_Queue

Source Location: /WindowsAzure/Storage/Queue.php

Class Overview

Microsoft_WindowsAzure_Storage
   |
   --Microsoft_WindowsAzure_Storage_Queue



Author(s):

Copyright:

  • Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Microsoft_WindowsAzure_Storage

Microsoft_WindowsAzure_Storage::__construct()
Creates a new Microsoft_WindowsAzure_Storage instance
Microsoft_WindowsAzure_Storage::createQueryStringFromArray()
Builds a query string from an array of elements
Microsoft_WindowsAzure_Storage::getAccountName()
Returns the Windows Azure account name
Microsoft_WindowsAzure_Storage::getBaseUrl()
Get base URL for creating requests
Microsoft_WindowsAzure_Storage::getCredentials()
Get Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance
Microsoft_WindowsAzure_Storage::getHttpClientChannel()
Retrieve HTTP client channel
Microsoft_WindowsAzure_Storage::isoDate()
Generate ISO 8601 compliant date string in UTC time zone
Microsoft_WindowsAzure_Storage::isValidMetadataName()
Is valid metadata name?
Microsoft_WindowsAzure_Storage::setCredentials()
Set Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance
Microsoft_WindowsAzure_Storage::setHttpClientChannel()
Set the HTTP client channel to use
Microsoft_WindowsAzure_Storage::setProxy()
Set proxy
Microsoft_WindowsAzure_Storage::setRetryPolicy()
Set retry policy to use when making requests
Microsoft_WindowsAzure_Storage::urlencode()
URL encode function
Microsoft_WindowsAzure_Storage::_generateMetadataHeaders()
Generate metadata headers
Microsoft_WindowsAzure_Storage::_parseMetadataElement()
Parse metadata XML
Microsoft_WindowsAzure_Storage::_parseMetadataHeaders()
Parse metadata headers
Microsoft_WindowsAzure_Storage::_parseResponse()
Parse result from Microsoft_Http_Response
Microsoft_WindowsAzure_Storage::_performRequest()
Perform request using Microsoft_Http_Client channel

Class Details

[line 49]


Tags:

copyright:  Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)
license:  http://phpazure.codeplex.com/license


[ Top ]


Class Methods


static method isValidQueueName [line 518]

static boolean isValidQueueName( [string $queueName = ''])

Is valid queue name?



Tags:

access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

constructor __construct [line 70]

Microsoft_WindowsAzure_Storage_Queue __construct( [string $host = Microsoft_WindowsAzure_Storage::URL_DEV_QUEUE], [string $accountName = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT], [string $accountKey = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY], [boolean $usePathStyleUri = false], [Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null])

Creates a new Microsoft_WindowsAzure_Storage_Queue instance



Tags:

access:  public


Overrides Microsoft_WindowsAzure_Storage::__construct() (Creates a new Microsoft_WindowsAzure_Storage instance)

Parameters:

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
Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract   $retryPolicy   Retry policy to use when making requests

[ Top ]

method clearMessages [line 470]

void clearMessages( [string $queueName = ''])

Clear queue messages



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method createQueue [line 112]

object Queue createQueue( [string $queueName = ''], [array $metadata = array()])

Create queue



Tags:

return:  properties
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name
array   $metadata   Key/value pairs of meta data

[ Top ]

method createQueueIfNotExists [line 144]

void createQueueIfNotExists( [string $queueName = ''], [array $metadata = array()])

Create queue if it does not exist



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name
array   $metadata   Key/value pairs of meta data

[ Top ]

method deleteMessage [line 493]

void deleteMessage( [string $queueName = ''], Microsoft_WindowsAzure_Storage_QueueMessage $message)

Delete queue message



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name
Microsoft_WindowsAzure_Storage_QueueMessage   $message   Message to delete from queue. A message retrieved using "peekMessages" can NOT be deleted!

[ Top ]

method deleteQueue [line 243]

void deleteQueue( [string $queueName = ''])

Delete queue



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method getMessages [line 376]

array getMessages( [string $queueName = ''], [string $numOfMessages = 1], [int $visibilityTimeout = null], [string $peek = false])

Get queue messages



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

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?

[ Top ]

method getQueue [line 158]

Microsoft_WindowsAzure_Storage_QueueInstance getQueue( [string $queueName = ''])

Get queue



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method getQueueMetadata [line 192]

array getQueueMetadata( [string $queueName = ''])

Get queue metadata



Tags:

return:  Key/value pairs of meta data
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method hasMessages [line 459]

boolean hasMessages( [string $queueName = ''])

Checks to see if a given queue has messages



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method listQueues [line 270]

array listQueues( [string $prefix = null], [int $maxResults = null], [string $marker = null], [string $include = null], [int $currentResultCount = 0])

List queues



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

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)

[ Top ]

method peekMessages [line 447]

array peekMessages( [string $queueName = ''], [string $numOfMessages = 1])

Peek queue messages



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

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.

[ Top ]

method putMessage [line 327]

void putMessage( [string $queueName = ''], [string $message = ''], [int $ttl = null])

Put message into queue



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name
string   $message   Message
int   $ttl   Message Time-To-Live (in seconds). Defaults to 7 days if the parameter is omitted.

[ Top ]

method queueExists [line 84]

boolean queueExists( [string $queueName = ''])

Check if a queue exists



Tags:

access:  public


Parameters:

string   $queueName   Queue name

[ Top ]

method setQueueMetadata [line 213]

void setQueueMetadata( [string $queueName = ''], [array $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.




Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $queueName   Queue name
array   $metadata   Key/value pairs of meta data

[ Top ]

method _getErrorMessage [line 550]

string _getErrorMessage( $response, [string $alternativeError = 'Unknown error.'])

Get error message from Microsoft_Http_Response



Tags:

access:  protected


Parameters:

Microsoft_Http_Response   $response   Repsonse
string   $alternativeError   Alternative error message

[ Top ]


Class Constants

MAX_MESSAGE_SIZE =  8388608

[line 54]

Maximal message size (in bytes)


[ Top ]

MAX_MESSAGE_TTL =  604800

[line 59]

Maximal message ttl (in seconds)


[ Top ]



Documentation generated on Wed, 18 May 2011 12:06:45 +0200 by phpDocumentor 1.4.3