API Documentation

Zend/Service/WindowsAzure/Storage.php

Show: inherited
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 license@zend.com 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 24594 2012-01-05 21:27:01Z matthew $  

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

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

Default value''Details
Type
string
Propertyprotectedstring  $_accountName= ''''

Account name for Windows Azure

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

Current API version

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

Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Propertyprotectedstring  $_host= ''''

Storage host name

Default value''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

Default value''Details
Type
string
Propertyprotectedint  $_proxyPort= '80'

Proxy port

Default value80Details
Type
int
Propertyprotectedstring  $_proxyUrl= ''''

Proxy url

Default value''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::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
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::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
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.15.1.