Service/WindowsAzure/Storage.php

Show: PublicProtectedPrivateinherited
Table of Contents
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service_WindowsAzure  
Subpackage
Storage  
Version
$Id$  

\Zend_Service_WindowsAzure_Storage

Package: 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  URL_DEV_BLOB = "127.0.0.1:10000"
Development storage URLS
>VConstant  URL_DEV_QUEUE = "127.0.0.1:10001"
>VConstant  URL_DEV_TABLE = "127.0.0.1:10002"
>VConstant  URL_CLOUD_BLOB = "blob.core.windows.net"
Live storage URLS
>VConstant  URL_CLOUD_QUEUE = "queue.core.windows.net"
>VConstant  URL_CLOUD_TABLE = "table.core.windows.net"
>VConstant  RESOURCE_UNKNOWN = "unknown"
Resource types
>VConstant  RESOURCE_CONTAINER = "c"
>VConstant  RESOURCE_BLOB = "b"
>VConstant  RESOURCE_TABLE = "t"
>VConstant  RESOURCE_ENTITY = "e"
>VConstant  RESOURCE_QUEUE = "q"
>VConstant  PREFIX_PROPERTIES = "x-ms-prop-"
HTTP header prefixes
>VConstant  PREFIX_METADATA = "x-ms-meta-"
>VConstant  PREFIX_STORAGE_HEADER = "x-ms-"

Properties

>VPropertyprotectedstring $_accountKey = ''
Account key for Windows Azure
Default value''Details
Type
string
>VPropertyprotectedstring $_accountName = ''
Account name for Windows Azure
Default value''Details
Type
string
>VPropertyprotectedstring $_apiVersion = '2009-09-19'
Current API version
Default value'2009-09-19'Details
Type
string
>VPropertyprotected\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $_credentials = null
Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
>VPropertyprotectedstring $_host = ''
Storage host name
Default value''Details
Type
string
>VPropertyprotected\Zend_Http_Client $_httpClientChannel = null
Zend_Http_Client channel used for communication with REST services
Default valuenullDetails
Type
\Zend_Http_Client
>VPropertyprotectedstring $_proxyCredentials = ''
Proxy credentials
Default value''Details
Type
string
>VPropertyprotectedint $_proxyPort = 80
Proxy port
Default value80Details
Type
int
>VPropertyprotectedstring $_proxyUrl = ''
Proxy url
Default value''Details
Type
string
>VPropertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance
>VPropertyprotectedboolean $_usePathStyleUri = false
Use path-style URI's
Default valuefalseDetails
Type
boolean
>VPropertyprotectedboolean $_useProxy = false
Use proxy?
Default valuefalseDetails
Type
boolean

Methods

methodpublic__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

Parameters
NameTypeDescription
$hoststring

Storage host name

$accountNamestring

Account name for Windows Azure

$accountKeystring

Account key for Windows Azure

$usePathStyleUriboolean

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
NameTypeDescription
$metadataarray
Returns
TypeDescription
\HTTPheaders containing metadata
methodprotected_parseMetadataElement( $element = null) : array

Parse metadata XML

Parameters
NameTypeDescription
$element
Returns
TypeDescription
array
methodprotected_parseMetadataHeaders(array $headers = array()) : array

Parse metadata headers

Parameters
NameTypeDescription
$headersarray

HTTP headers containing metadata

Returns
TypeDescription
array
methodprotected_parseResponse(\Zend_Http_Response $response = null) : object

Parse result from Zend_Http_Response

Parameters
NameTypeDescription
$response\Zend_Http_Response

Response from HTTP call

Returns
TypeDescription
object
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodprotected_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

Parameters
NameTypeDescription
$pathstring

Path

$queryStringstring

Query string

$httpVerbstring

HTTP verb the request will use

$headersarray

x-ms headers to add

$forTableStorageboolean

Is the request for table storage?

$rawDatamixed

Optional RAW HTTP data to be sent over the wire

$resourceTypestring

Resource type

$requiredPermissionstring

Required permission

Returns
TypeDescription
\Zend_Http_Response
methodpubliccreateQueryStringFromArray( $queryString) : string
static

Builds a query string from an array of elements

Parameters
NameTypeDescription
$queryString
Returns
TypeDescription
stringAssembled query string
methodpublicgetAccountName() : string

Returns the Windows Azure account name

Returns
TypeDescription
string
methodpublicgetBaseUrl() : string

Get base URL for creating requests

Returns
TypeDescription
string
methodpublicgetCredentials() : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract

Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

methodpublicgetHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Retrieve HTTP client channel

methodpublicisValidMetadataName(string $metadataName = '') : boolean
static

Is valid metadata name?

Parameters
NameTypeDescription
$metadataNamestring

Metadata name

Returns
TypeDescription
boolean
methodpublicisoDate(int $timestamp = null) : string

Generate ISO 8601 compliant date string in UTC time zone

Parameters
NameTypeDescription
$timestampint
Returns
TypeDescription
string
methodpublicsetCredentials(\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) : void

Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Parameters
NameTypeDescription
$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
NameTypeDescription
$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
NameTypeDescription
$useProxyboolean

Use proxy?

$proxyUrlstring

Proxy URL

$proxyPortint

Proxy port

$proxyCredentialsstring

Proxy credentials

methodpublicsetRetryPolicy(\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : void

Set retry policy to use when making requests

Parameters
NameTypeDescription
$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

methodpublicurlencode(string $value) : string
static

URL encode function

Parameters
NameTypeDescription
$valuestring

Value to encode

Returns
TypeDescription
stringEncoded value
Documentation was generated by phpDocumentor 2.2.0 .