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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service_WindowsAzure
- Subpackage
- Storage
- Version
- $Id: Storage.php 24697 2012-03-23 13:11:04Z ezimuel $
\Zend_Service_WindowsAzure_Storage
- Children
- \Zend_Service_WindowsAzure_Storage_Queue
- \Zend_Service_WindowsAzure_Storage_Blob
- \Zend_Service_WindowsAzure_Storage_BatchStorageAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $_credentials = null
Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
null
Details


\Zend_Http_Client $_httpClientChannel = null
Zend_Http_Client channel used for communication with REST services
null
Details- Type
- \Zend_Http_Client


\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance
null
Details
Methods


__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) : void
Creates a new Zend_Service_WindowsAzure_Storage instance
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 |


_generateMetadataHeaders(array $metadata = array()) : \HTTP
Generate metadata headers
Name | Type | Description |
---|---|---|
$metadata | array |
Type | Description |
---|---|
\HTTP | headers containing metadata |


_parseMetadataElement( $element = null) : array
Parse metadata XML
Name | Type | Description |
---|---|---|
$element |
Type | Description |
---|---|
array |


_parseMetadataHeaders(array $headers = array()) : array
Parse metadata headers
Name | Type | Description |
---|---|---|
$headers | array | HTTP headers containing metadata |
Type | Description |
---|---|
array |


_parseResponse(\Zend_Http_Response $response = null) : object
Parse result from Zend_Http_Response
Name | Type | Description |
---|---|---|
$response | \Zend_Http_Response | Response from HTTP call |
Type | Description |
---|---|
object |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


_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
Perform request using Zend_Http_Client channel
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 |
Type | Description |
---|---|
\Zend_Http_Response |


createQueryStringFromArray(array $queryString) : string
Builds a query string from an array of elements
Name | Type | Description |
---|---|---|
$queryString | array | Array of elements |
Type | Description |
---|---|
string | Assembled query string |


getCredentials() : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract |


getHttpClientChannel() : \Zend_Http_Client_Adapter_Interface
Retrieve HTTP client channel
Type | Description |
---|---|
\Zend_Http_Client_Adapter_Interface |


isValidMetadataName(string $metadataName = '') : boolean
Is valid metadata name?
Name | Type | Description |
---|---|---|
$metadataName | string | Metadata name |
Type | Description |
---|---|
boolean |


isoDate(int $timestamp = null) : string
Generate ISO 8601 compliant date string in UTC time zone
Name | Type | Description |
---|---|---|
$timestamp | int |
Type | Description |
---|---|
string |


setCredentials(\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) : void
Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
Name | Type | Description |
---|---|---|
$credentials | \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract | Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance to use for request signing. |


setHttpClientChannel(\Zend_Http_Client_Adapter_Interface | string $adapterInstance = 'Zend_Http_Client_Adapter_Proxy') : void
Set the HTTP client channel to use
Name | Type | Description |
---|---|---|
$adapterInstance | \Zend_Http_Client_Adapter_Interface | string | Adapter instance or adapter class name. |


setProxy(boolean $useProxy = false, string $proxyUrl = '', int $proxyPort = 80, string $proxyCredentials = '') : void
Set proxy
Name | Type | Description |
---|---|---|
$useProxy | boolean | Use proxy? |
$proxyUrl | string | Proxy URL |
$proxyPort | int | Proxy port |
$proxyCredentials | string | Proxy credentials |


setRetryPolicy(\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : void
Set retry policy to use when making requests
Name | Type | Description |
---|---|---|
$retryPolicy | \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract | Retry policy to use when making requests |