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

Class: Microsoft_WindowsAzure_Storage

Source Location: /WindowsAzure/Storage.php

Class Overview




Author(s):

Copyright:

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

Variables

Constants

Methods


Child classes:


Class Details

[line 48]


Tags:

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


[ Top ]


Class Variables

$_accountKey =  ''

[line 107]

Account key for Windows Azure



Tags:

access:  protected

Type:   string


[ Top ]

$_accountName =  ''

[line 100]

Account name for Windows Azure



Tags:

access:  protected

Type:   string


[ Top ]

$_apiVersion =  '2009-09-19'

[line 86]

Current API version



Tags:

access:  protected

Type:   string


[ Top ]

$_credentials =  null

[line 121]

Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance



Tags:

access:  protected



[ Top ]

$_host =  ''

[line 93]

Storage host name



Tags:

access:  protected

Type:   string


[ Top ]

$_httpClientChannel =  null

[line 135]

Microsoft_Http_Client channel used for communication with REST services



Tags:

access:  protected



[ Top ]

$_proxyCredentials =  ''

[line 163]

Proxy credentials



Tags:

access:  protected

Type:   string


[ Top ]

$_proxyPort =  80

[line 156]

Proxy port



Tags:

access:  protected

Type:   int


[ Top ]

$_proxyUrl =  ''

[line 149]

Proxy url



Tags:

access:  protected

Type:   string


[ Top ]

$_retryPolicy =  null

[line 128]

Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance



Tags:

access:  protected



[ Top ]

$_usePathStyleUri =  false

[line 114]

Use path-style URI's



Tags:

access:  protected

Type:   boolean


[ Top ]

$_useProxy =  false

[line 142]

Use proxy?



Tags:

access:  protected

Type:   boolean


[ Top ]



Class Methods


static method createQueryStringFromArray [line 557]

static string createQueryStringFromArray( array $queryString)

Builds a query string from an array of elements



Tags:

return:  Assembled query string
access:  public


Parameters:

array   $queryString   Array of elements

[ Top ]

static method isValidMetadataName [line 538]

static boolean isValidMetadataName( [string $metadataName = ''])

Is valid metadata name?



Tags:

access:  public


Parameters:

string   $metadataName   Metadata name

[ Top ]

static method urlencode [line 527]

static string urlencode( string $value)

URL encode function



Tags:

return:  Encoded value
access:  public


Parameters:

string   $value   Value to encode

[ Top ]

method getAccountName [line 292]

string getAccountName( )

Returns the Windows Azure account name



Tags:

access:  public


[ Top ]

method getBaseUrl [line 302]

string getBaseUrl( )

Get base URL for creating requests



Tags:

access:  public


[ Top ]

method getCredentials [line 329]

Microsoft_WindowsAzure_Credentials_CredentialsAbstract getCredentials( )

Get Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance



Tags:

access:  public


[ Top ]

method getHttpClientChannel [line 235]

Microsoft_Http_Client_Adapter_Interface getHttpClientChannel( )

Retrieve HTTP client channel



Tags:

access:  public


[ Top ]

method isoDate [line 507]

string isoDate( [int $timestamp = null])

Generate ISO 8601 compliant date string in UTC time zone



Tags:

access:  public


Parameters:

int   $timestamp  

[ Top ]

method setCredentials [line 316]

void setCredentials( Microsoft_WindowsAzure_Credentials_CredentialsAbstract $credentials)

Set Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance



Tags:

access:  public


Parameters:

Microsoft_WindowsAzure_Credentials_CredentialsAbstract   $credentials   Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance to use for request signing.

[ Top ]

method setHttpClientChannel [line 225]

void setHttpClientChannel( [Microsoft_Http_Client_Adapter_Interface|string $adapterInstance = 'Microsoft_Http_Client_Adapter_Proxy'])

Set the HTTP client channel to use



Tags:

access:  public


Parameters:

Microsoft_Http_Client_Adapter_Interface|string   $adapterInstance   Adapter instance or adapter class name.

[ Top ]

method setProxy [line 261]

void setProxy( [boolean $useProxy = false], [string $proxyUrl = ''], [int $proxyPort = 80], [string $proxyCredentials = ''])

Set proxy



Tags:

access:  public


Parameters:

boolean   $useProxy   Use proxy?
string   $proxyUrl   Proxy URL
int   $proxyPort   Proxy port
string   $proxyCredentials   Proxy credentials

[ Top ]

method setRetryPolicy [line 245]

void setRetryPolicy( [Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null])

Set retry policy to use when making requests



Tags:

access:  public


Parameters:

Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract   $retryPolicy   Retry policy to use when making requests

[ Top ]

constructor __construct [line 174]

Microsoft_WindowsAzure_Storage __construct( [string $host = self::URL_DEV_BLOB], [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 instance



Tags:

access:  public


Overridden in child classes as:

Microsoft_WindowsAzure_Storage_Table::__construct()
Creates a new Microsoft_WindowsAzure_Storage_Table instance
Microsoft_WindowsAzure_Storage_Blob::__construct()
Creates a new Microsoft_WindowsAzure_Storage_Blob instance
Microsoft_WindowsAzure_Storage_Queue::__construct()
Creates a new Microsoft_WindowsAzure_Storage_Queue 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 _generateMetadataHeaders [line 439]

HTTP _generateMetadataHeaders( [array $metadata = array()])

Generate metadata headers



Tags:

return:  headers containing metadata
access:  protected


Parameters:

array   $metadata  

[ Top ]

method _parseMetadataElement [line 491]

array _parseMetadataElement( [ $element = null], SimpleXMLElement $parentElement)

Parse metadata XML



Tags:

access:  protected


Parameters:

SimpleXMLElement   $parentElement   Element containing the Metadata element.
   $element  

[ Top ]

method _parseMetadataHeaders [line 468]

array _parseMetadataHeaders( [array $headers = array()])

Parse metadata headers



Tags:

access:  protected


Parameters:

array   $headers   HTTP headers containing metadata

[ Top ]

method _parseResponse [line 410]

object _parseResponse( [ $response = null])

Parse result from Microsoft_Http_Response



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  protected


Parameters:

Microsoft_Http_Response   $response   Response from HTTP call

[ Top ]

method _performRequest [line 347]

Microsoft_Http_Response _performRequest( [string $path = '/'], [string $queryString = ''], [string $httpVerb = Microsoft_Http_Client::GET], [array $headers = array()], [boolean $forTableStorage = false], [mixed $rawData = null], [string $resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN], [string $requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ])

Perform request using Microsoft_Http_Client channel



Tags:

access:  protected


Overridden in child classes as:

Microsoft_WindowsAzure_Storage_Table::_performRequest()
Perform request using Microsoft_Http_Client channel

Parameters:

string   $path   Path
string   $queryString   Query string
string   $httpVerb   HTTP verb the request will use
array   $headers   x-ms headers to add
boolean   $forTableStorage   Is the request for table storage?
mixed   $rawData   Optional RAW HTTP data to be sent over the wire
string   $resourceType   Resource type
string   $requiredPermission   Required permission

[ Top ]


Class Constants

PREFIX_METADATA =  "x-ms-meta-"

[line 78]


[ Top ]

PREFIX_PROPERTIES =  "x-ms-prop-"

[line 77]

HTTP header prefixes


[ Top ]

PREFIX_STORAGE_HEADER =  "x-ms-"

[line 79]


[ Top ]

RESOURCE_BLOB =  "b"

[line 69]


[ Top ]

RESOURCE_CONTAINER =  "c"

[line 68]


[ Top ]

RESOURCE_ENTITY =  "e"

[line 71]


[ Top ]

RESOURCE_QUEUE =  "q"

[line 72]


[ Top ]

RESOURCE_TABLE =  "t"

[line 70]


[ Top ]

RESOURCE_UNKNOWN =  "unknown"

[line 67]

Resource types


[ Top ]

URL_CLOUD_BLOB =  "blob.core.windows.net"

[line 60]

Live storage URLS


[ Top ]

URL_CLOUD_QUEUE =  "queue.core.windows.net"

[line 61]


[ Top ]

URL_CLOUD_TABLE =  "table.core.windows.net"

[line 62]


[ Top ]

URL_DEV_BLOB =  "127.0.0.1:10000"

[line 53]

Development storage URLS


[ Top ]

URL_DEV_QUEUE =  "127.0.0.1:10001"

[line 54]


[ Top ]

URL_DEV_TABLE =  "127.0.0.1:10002"

[line 55]


[ Top ]



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