API Documentation

Service/WindowsAzure/Storage.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service_WindowsAzure  
subpackage
Storage  
version
$Id: Storage.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Service_WindowsAzure_Storage

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

Constants

Constant  URL_DEV_BLOB = '127.0.0.1:10000'

Development storage URLS

Constant  URL_DEV_QUEUE = '127.0.0.1:10001'
Constant  URL_DEV_TABLE = '127.0.0.1:10002'
Constant  URL_CLOUD_BLOB = 'blob.core.windows.net'

Live storage URLS

Constant  URL_CLOUD_QUEUE = 'queue.core.windows.net'
Constant  URL_CLOUD_TABLE = 'table.core.windows.net'
Constant  RESOURCE_UNKNOWN = 'unknown'

Resource types

Constant  RESOURCE_CONTAINER = 'c'
Constant  RESOURCE_BLOB = 'b'
Constant  RESOURCE_TABLE = 't'
Constant  RESOURCE_ENTITY = 'e'
Constant  RESOURCE_QUEUE = 'q'
Constant  PREFIX_PROPERTIES = 'x-ms-prop-'

HTTP header prefixes

Constant  PREFIX_METADATA = 'x-ms-meta-'
Constant  PREFIX_STORAGE_HEADER = 'x-ms-'

Properties

Propertyprotectedstring  $_accountKey= ''

Account key for Windows Azure

Details
Type
string
Propertyprotectedstring  $_accountName= ''

Account name for Windows Azure

Details
Type
string
Propertyprotectedstring  $_apiVersion= '2009-09-19'

Current API version

Default value2009-09-19Details
Type
string
Propertyprotected\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract  $_credentials= 'null'

Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Propertyprotectedstring  $_host= ''

Storage host name

Details
Type
string
Propertyprotected\Zend_Http_Client  $_httpClientChannel= 'null'

Zend_Http_Client channel used for communication with REST services

Default valuenullDetails
Type
\Zend_Http_Client
Propertyprotectedstring  $_proxyCredentials= ''

Proxy credentials

Details
Type
string
Propertyprotectedint  $_proxyPort= '80'

Proxy port

Default value80Details
Type
int
Propertyprotectedstring  $_proxyUrl= ''

Proxy url

Details
Type
string
Propertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract  $_retryPolicy= 'null'

Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance

Propertyprotectedboolean  $_usePathStyleUri= 'false'

Use path-style URI's

Default valuefalseDetails
Type
boolean
Propertyprotectedboolean  $_useProxy= 'false'

Use proxy?

Default valuefalseDetails
Type
boolean

Methods

methodpublic__construct( string $host = self, string $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract, string $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract, boolean $usePathStyleUri = false, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null ) : void

Creates a new Zend_Service_WindowsAzure_Storage instance

Parameters
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
methodprotected_generateMetadataHeaders( array $metadata = array ) : \HTTP

Generate metadata headers

Parameters
Name Type Description
$metadata array
Returns
Type Description
\HTTP headers containing metadata
methodprotected_parseMetadataElement(  $element = null ) : array

Parse metadata XML

Parameters
Name Type Description
$element
Returns
Type Description
array
methodprotected_parseMetadataHeaders( array $headers = array ) : array

Parse metadata headers

Parameters
Name Type Description
$headers array HTTP headers containing metadata
Returns
Type Description
array
methodprotected_parseResponse( \Zend_Http_Response $response = null ) : object

Parse result from Zend_Http_Response

Parameters
Name Type Description
$response \Zend_Http_Response Response from HTTP call
Returns
Type Description
object
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodprotected_performRequest( string $path = /, string $queryString, string $httpVerb = Zend_Http_Client, array $headers = array, boolean $forTableStorage = false, mixed $rawData = null, string $resourceType = Zend_Service_WindowsAzure_Storage, string $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract ) : \Zend_Http_Response

Perform request using Zend_Http_Client channel

Parameters
Name Type Description
$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
Type Description
\Zend_Http_Response
methodpubliccreateQueryStringFromArray( array $queryString ) : string
static

Builds a query string from an array of elements

Parameters
Name Type Description
$queryString array Array of elements
Returns
Type Description
string Assembled query string
methodpublicgetAccountName( ) : string

Returns the Windows Azure account name

Returns
Type Description
string
methodpublicgetBaseUrl( ) : string

Get base URL for creating requests

Returns
Type Description
string
methodpublicgetCredentials( ) : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

methodpublicgetHttpClientChannel( ) : \Zend_Http_Client_Adapter_Interface

Retrieve HTTP client channel

Returns
Type Description
\Zend_Http_Client_Adapter_Interface
methodpublicisValidMetadataName( string $metadataName ) : boolean
static

Is valid metadata name?

Parameters
Name Type Description
$metadataName string Metadata name
Returns
Type Description
boolean
methodpublicisoDate( int $timestamp = null ) : string

Generate ISO 8601 compliant date string in UTC time zone

Parameters
Name Type Description
$timestamp int
Returns
Type Description
string
methodpublicsetCredentials( \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials ) : void

Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Parameters
Name Type Description
$credentials \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance to use for request signing.
methodpublicsetHttpClientChannel( \Zend_Http_Client_Adapter_Interface|string $adapterInstance = Zend_Http_Client_Adapter_Proxy ) : void

Set the HTTP client channel to use

Parameters
Name Type Description
$adapterInstance \Zend_Http_Client_Adapter_Interface|string Adapter instance or adapter class name.
methodpublicsetProxy( boolean $useProxy = false, string $proxyUrl, int $proxyPort = 80, string $proxyCredentials ) : void

Set proxy

Parameters
Name Type Description
$useProxy boolean

Use proxy?

$proxyUrl string Proxy URL
$proxyPort int Proxy port
$proxyCredentials string Proxy credentials
methodpublicsetRetryPolicy( \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null ) : void

Set retry policy to use when making requests

Parameters
Name Type Description
$retryPolicy \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract Retry policy to use when making requests
methodpublicurlencode( string $value ) : string
static

URL encode function

Parameters
Name Type Description
$value string Value to encode
Returns
Type Description
string Encoded value
Documentation was generated by DocBlox 0.13.3.