category Zend
package Zend_Service_WindowsAzure
subpackage Storage
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Creates a new Zend_Service_WindowsAzure_Storage instance

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

Parameters

$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

Builds a query string from an array of elements

createQueryStringFromArray($queryString) : string
Static

Parameters

$queryString

Returns

stringAssembled query string

Returns the Windows Azure account name

getAccountName() : string

Returns

string

Get base URL for creating requests

getBaseUrl() : string

Returns

string

Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

getCredentials() : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Returns

\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Retrieve HTTP client channel

getHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Returns

\Zend_Http_Client_Adapter_Interface

Is valid metadata name?

isValidMetadataName(string $metadataName = '') : boolean
Static

Parameters

$metadataName

string

Metadata name

Returns

boolean

Generate ISO 8601 compliant date string in UTC time zone

isoDate(integer $timestamp = null) : string

Parameters

$timestamp

integer

Returns

string

Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

setCredentials(\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) 

Parameters

$credentials

\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance to use for request signing.

Set the HTTP client channel to use

setHttpClientChannel(\Zend_Http_Client_Adapter_Interface|string $adapterInstance = 'Zend_Http_Client_Adapter_Proxy'

Parameters

$adapterInstance

\Zend_Http_Client_Adapter_Interfacestring

Adapter instance or adapter class name.

Set proxy

setProxy(boolean $useProxy = false, string $proxyUrl = '', integer $proxyPort = 80, string $proxyCredentials = ''

Parameters

$useProxy

boolean

Use proxy?

$proxyUrl

string

Proxy URL

$proxyPort

integer

Proxy port

$proxyCredentials

string

Proxy credentials

Set retry policy to use when making requests

setRetryPolicy(\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null

Parameters

$retryPolicy

\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

URL encode function

urlencode(string $value) : string
Static

Parameters

$value

string

Value to encode

Returns

stringEncoded value

Generate metadata headers

_generateMetadataHeaders(array $metadata = array()) : \HTTP

Parameters

$metadata

array

Returns

\HTTPheaders containing metadata

Parse metadata XML

_parseMetadataElement($element = null) : array

Parameters

$element

Returns

array

Parse metadata headers

_parseMetadataHeaders(array $headers = array()) : array

Parameters

$headers

array

HTTP headers containing metadata

Returns

array

Parse result from Zend_Http_Response

_parseResponse(\Zend_Http_Response $response = null) : object

Parameters

$response

\Zend_Http_Response

Response from HTTP call

Exceptions

\Zend_Service_WindowsAzure_Exception

Returns

object

Perform request using Zend_Http_Client channel

_performRequest(string $path = '/', string $queryString = '', string $httpVerb = \Zend_Http_Client::GET, array $headers = array(), boolean $forTableStorage = false, mixed $rawData = null, string $resourceType = \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, string $requiredPermission = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ) : \Zend_Http_Response

Parameters

$path

string

Path

$queryString

string

Query string

$httpVerb

string

HTTP verb the request will use

$headers

array

x-ms headers to add

$forTableStorage

boolean

Is the request for table storage?

$rawData

mixed

Optional RAW HTTP data to be sent over the wire

$resourceType

string

Resource type

$requiredPermission

string

Required permission

Returns

\Zend_Http_Response

 Properties

 

Account key for Windows Azure

$_accountKey : string

Default

''
 

Account name for Windows Azure

$_accountName : string

Default

''
 

Current API version

$_apiVersion : string

Default

'2009-09-19'
 

Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

$_credentials : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Default

null
 

Storage host name

$_host : string

Default

''
 

Zend_Http_Client channel used for communication with REST services

$_httpClientChannel : \Zend_Http_Client

Default

null
 

Proxy credentials

$_proxyCredentials : string

Default

''
 

Proxy port

$_proxyPort : integer

Default

80
 

Proxy url

$_proxyUrl : string

Default

''
 

Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance

$_retryPolicy : \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Default

null
 

Use path-style URI's

$_usePathStyleUri : boolean

Default

false
 

Use proxy?

$_useProxy : boolean

Default

false

 Constants

   

HTTP header prefixes

PREFIX_PROPERTIES = "x-ms-prop-" 
 

PREFIX_STORAGE_HEADER

PREFIX_STORAGE_HEADER = "x-ms-" 
 

RESOURCE_BLOB

RESOURCE_BLOB = "b" 
 

RESOURCE_CONTAINER

RESOURCE_CONTAINER = "c" 
 

RESOURCE_ENTITY

RESOURCE_ENTITY = "e" 
 

RESOURCE_QUEUE

RESOURCE_QUEUE = "q" 
 

RESOURCE_TABLE

RESOURCE_TABLE = "t" 
 

Resource types

RESOURCE_UNKNOWN = "unknown" 
 

Live storage URLS

URL_CLOUD_BLOB = "blob.core.windows.net" 
 

URL_CLOUD_QUEUE

URL_CLOUD_QUEUE = "queue.core.windows.net" 
 

URL_CLOUD_TABLE

URL_CLOUD_TABLE = "table.core.windows.net" 
 

Development storage URLS

URL_DEV_BLOB = "127.0.0.1:10000" 
 

URL_DEV_QUEUE

URL_DEV_QUEUE = "127.0.0.1:10001" 
 

URL_DEV_TABLE

URL_DEV_TABLE = "127.0.0.1:10002"