Service/WindowsAzure/Storage/Blob.php
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
- name_todo
- Package
- Zend_Service_WindowsAzure
- Subpackage
- Storage
- Version
- $Id: Blob.php 24697 2012-03-23 13:11:04Z ezimuel $
\Zend_Service_WindowsAzure_Storage_Blob
- Parent(s)
- \Zend_Service_WindowsAzure_Storage
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants

ACL_PUBLIC
= 'container'
- Deprecated
- Use ACL_PUBLIC_CONTAINER or ACL_PUBLIC_BLOB instead.

URL_DEV_QUEUE
= "127.0.0.1:10001"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE

URL_DEV_TABLE
= "127.0.0.1:10002"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::URL_DEV_TABLE

URL_CLOUD_BLOB
= "blob.core.windows.net"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::URL_CLOUD_BLOB

URL_CLOUD_QUEUE
= "queue.core.windows.net"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::URL_CLOUD_QUEUE

URL_CLOUD_TABLE
= "table.core.windows.net"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::URL_CLOUD_TABLE

RESOURCE_CONTAINER
= "c"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::RESOURCE_CONTAINER

RESOURCE_BLOB
= "b"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::RESOURCE_BLOB

RESOURCE_TABLE
= "t"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::RESOURCE_TABLE

RESOURCE_ENTITY
= "e"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::RESOURCE_ENTITY

RESOURCE_QUEUE
= "q"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::RESOURCE_QUEUE

PREFIX_METADATA
= "x-ms-meta-"
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::PREFIX_METADATA

PREFIX_STORAGE_HEADER
= "x-ms-"
Properties


string $_accountKey = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_accountKey


string $_accountName = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_accountName


string $_apiVersion = '2009-09-19'
'2009-09-19'
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_apiVersion


\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $_credentials = null
null
Details

string $_host = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_host


\Zend_Http_Client $_httpClientChannel = null
null
Details

string $_proxyCredentials = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_proxyCredentials


int $_proxyPort = 80
80
Details- Type
- int
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_proxyPort


string $_proxyUrl = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_proxyUrl


\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
null
Details

\Zend_Service_WindowsAzure_Credentials_SharedAccessSignature $_sharedAccessSignatureCredentials = null
null
Details

boolean $_usePathStyleUri = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_usePathStyleUri


boolean $_useProxy = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Service_WindowsAzure_Storage::$$_useProxy
Methods


__construct(string $host = \Zend_Service_WindowsAzure_Storage::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_Blob 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 |


_generateBlockId(int $part = 0) : string
Generate block id
Name | Type | Description |
---|---|---|
$part | int | Block number |
Type | Description |
---|---|
string | Windows Azure Blob Storage block number |


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


_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string
Get error message from Zend_Http_Response
Name | Type | Description |
---|---|---|
$response | \Zend_Http_Response | Repsonse |
$alternativeError | string | Alternative error message |
Type | Description |
---|---|
string |


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


_parseMetadataHeaders(array $headers = array()) : array
Parse metadata headers
Inherited from: \Zend_Service_WindowsAzure_Storage::_parseMetadataHeaders()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
Inherited from: \Zend_Service_WindowsAzure_Storage::_parseResponse()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
Inherited from: \Zend_Service_WindowsAzure_Storage::_performRequest()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 |


blobExists(string $containerName = '', string $blobName = '', string $snapshotId = null) : boolean
Check if a blob exists
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
Type | Description |
---|---|
boolean |


containerExists(string $containerName = '') : boolean
Check if a container exists
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
Type | Description |
---|---|
boolean |


copyBlob(string $sourceContainerName = '', string $sourceBlobName = '', string $destinationContainerName = '', string $destinationBlobName = '', array $metadata = array(), string $sourceSnapshotId = null, string $destinationLeaseId = null, array $additionalHeaders = array()) : object
Copy blob
Name | Type | Description |
---|---|---|
$sourceContainerName | string | Source container name |
$sourceBlobName | string | Source blob name |
$destinationContainerName | string | Destination container name |
$destinationBlobName | string | Destination blob name |
$metadata | array | Key/value pairs of meta data |
$sourceSnapshotId | string | Source snapshot identifier |
$destinationLeaseId | string | Destination lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd894037.aspx for more information. |
Type | Description |
---|---|
object | Partial blob properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


createContainer(string $containerName = '', array $metadata = array()) : object
Create container
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$metadata | array | Key/value pairs of meta data |
Type | Description |
---|---|
object | Container properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


createContainerIfNotExists(string $containerName = '', array $metadata = array()) : void
Create container if it does not exist
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$metadata | array | Key/value pairs of meta data |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


createPageBlob(string $containerName = '', string $blobName = '', int $size = 0, array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object
Create page blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$size | int | Size of the page blob in bytes |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
object | Partial blob properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


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


createResourceName(string $containerName = '', string $blobName = '') : string
Create resource name
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
Type | Description |
---|---|
string |


deleteBlob(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : void
Delete blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


deleteContainer(string $containerName = '', array $additionalHeaders = array()) : void
Delete container
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


generateSharedAccessUrl(string $containerName = '', string $blobName = '', string $resource = 'b', string $permissions = 'r', string $start = '', string $expiry = '', string $identifier = '') : string
Generate shared access URL
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$resource | string | Signed resource - container (c) - blob (b) |
$permissions | string | Signed permissions - read (r), write (w), delete (d) and list (l) |
$start | string | The time at which the Shared Access Signature becomes valid. |
$expiry | string | The time at which the Shared Access Signature becomes invalid. |
$identifier | string | Signed identifier |
Type | Description |
---|---|
string |


getAccountName() : string
Returns the Windows Azure account name
Inherited from: \Zend_Service_WindowsAzure_Storage::getAccountName()Type | Description |
---|---|
string |


getBaseUrl() : string
Get base URL for creating requests
Inherited from: \Zend_Service_WindowsAzure_Storage::getBaseUrl()Type | Description |
---|---|
string |


getBlob(string $containerName = '', string $blobName = '', string $localFileName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : void
Get blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$localFileName | string | Local file name to store downloaded blob |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getBlobData(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : mixed
Get blob data
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
mixed | Blob contents |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getBlobInstance(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : \Zend_Service_WindowsAzure_Storage_BlobInstance
Get blob instance
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_BlobInstance |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getBlobMetadata(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null) : array
Get blob metadata
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
Type | Description |
---|---|
array | Key/value pairs of meta data |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getBlobProperties(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null) : \Zend_Service_WindowsAzure_Storage_BlobInstance
Get blob properties
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_BlobInstance |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getBlockList(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, integer $type = 0) : array
Get block list
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$snapshotId | string | Snapshot identifier |
$leaseId | string | Lease identifier |
$type | integer | Type of block list to retrieve. 0 = all, 1 = committed, 2 = uncommitted |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getContainer(string $containerName = '') : \Zend_Service_WindowsAzure_Storage_BlobContainer
Get container
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_BlobContainer |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getContainerAcl(string $containerName = '', bool $signedIdentifiers = false) : string
Get container ACL
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$signedIdentifiers | bool | Display only private/blob/container or display signed identifiers? |
Type | Description |
---|---|
string | Acl, to be compared with Zend_Service_WindowsAzure_Storage_Blob::ACL_* |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getContainerMetadata(string $containerName = '') : array
Get container metadata
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
Type | Description |
---|---|
array | Key/value pairs of meta data |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


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


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


getPageRegions(string $containerName = '', string $blobName = '', int $startByteOffset = 0, int $endByteOffset = 0, string $leaseId = null) : array
Put page in page blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$startByteOffset | int | Start byte offset |
$endByteOffset | int | End byte offset |
$leaseId | string | Lease identifier |
Type | Description |
---|---|
array | Array of page ranges |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


getWrapperClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob
Get wrapper client for stream type
Name | Type | Description |
---|---|---|
$name | string | Protocol name |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_Blob |


isValidContainerName(string $containerName = '') : boolean
Is valid container name?
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
Type | Description |
---|---|
boolean |


isValidMetadataName(string $metadataName = '') : boolean
Is valid metadata name?
Inherited from: \Zend_Service_WindowsAzure_Storage::isValidMetadataName()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
Inherited from: \Zend_Service_WindowsAzure_Storage::isoDate()Name | Type | Description |
---|---|---|
$timestamp | int |
Type | Description |
---|---|
string |


leaseBlob(string $containerName = '', string $blobName = '', string $leaseAction = self::LEASE_ACQUIRE, string $leaseId = null) : \Zend_Service_WindowsAzure_Storage_LeaseInstance
Lease blob - See (http://msdn.microsoft.com/en-us/library/ee691972.aspx)
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$leaseAction | string | Lease action (Zend_Service_WindowsAzure_Storage_Blob::LEASE_*) |
$leaseId | string | Lease identifier, required to renew the lease or to release the lease. |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_LeaseInstance | Lease instance |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


listBlobs(string $containerName = '', string $prefix = '', string $delimiter = '', int $maxResults = null, string $marker = null, string $include = null, int $currentResultCount = 0) : array
List blobs
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$prefix | string | Optional. Filters the results to return only blobs whose name begins with the specified prefix. |
$delimiter | string | Optional. Delimiter, i.e. '/', for specifying folder hierarchy |
$maxResults | int | Optional. Specifies the maximum number of blobs to return per call to Azure storage. This does NOT affect list size returned by this function. (maximum: 5000) |
$marker | string | Optional string value that identifies the portion of the list to be returned with the next list operation. |
$include | string | Optional. Specifies that the response should include one or more of the following subsets: '', 'metadata', 'snapshots', 'uncommittedblobs'). Multiple values can be added separated with a comma (,) |
$currentResultCount | int | Current result count (internal use) |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


listContainers(string $prefix = null, int $maxResults = null, string $marker = null, string $include = null, int $currentResultCount = 0) : array
List containers
Name | Type | Description |
---|---|---|
$prefix | string | Optional. Filters the results to return only containers whose name begins with the specified prefix. |
$maxResults | int | Optional. Specifies the maximum number of containers to return per call to Azure storage. This does NOT affect list size returned by this function. (maximum: 5000) |
$marker | string | Optional string value that identifies the portion of the list to be returned with the next list operation. |
$include | string | Optional. Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata') |
$currentResultCount | int | Current result count (internal use) |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putBlob(string $containerName = '', string $blobName = '', string $localFileName = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object
Put blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$localFileName | string | Local file name to be uploaded |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
object | Partial blob properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putBlobData(string $containerName = '', string $blobName = '', mixed $data = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object
Put blob data
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$data | mixed | Data to store |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
object | Partial blob properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putBlock(string $containerName = '', string $blobName = '', string $identifier = '', array $contents = '', string $leaseId = null) : void
Put large blob block
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$identifier | string | Block ID |
$contents | array | Contents of the block |
$leaseId | string | Lease identifier |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putBlockList(string $containerName = '', string $blobName = '', array $blockList = array(), array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : void
Put block list
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$blockList | array | Array of block identifiers |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putLargeBlob(string $containerName = '', string $blobName = '', string $localFileName = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object
Put large blob (> 64 MB)
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$localFileName | string | Local file name to be uploaded |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
object | Partial blob properties |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


putPage(string $containerName = '', string $blobName = '', int $startByteOffset = 0, int $endByteOffset = 0, mixed $contents = '', string $writeMethod = self::PAGE_WRITE_UPDATE, string $leaseId = null, array $additionalHeaders = array()) : void
Put page in page blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$startByteOffset | int | Start byte offset |
$endByteOffset | int | End byte offset |
$contents | mixed | Page contents |
$writeMethod | string | Write method (Zend_Service_WindowsAzure_Storage_Blob::PAGE_WRITE_*) |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


registerAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob
Register this object as stream wrapper client
Name | Type | Description |
---|---|---|
$name | string | Protocol name |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_Blob |


registerStreamWrapper(string $name = 'azure') : void
Register this object as stream wrapper
Name | Type | Description |
---|---|---|
$name | string | Protocol name |


setBlobMetadata(string $containerName = '', string $blobName = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : void
Set blob metadata
Calling the Set Blob Metadata operation overwrites all existing metadata that is associated with the blob. It's not possible to modify an individual name/value pair.
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$metadata | array | Key/value pairs of meta data |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


setBlobProperties(string $containerName = '', string $blobName = '', string $leaseId = null, array $additionalHeaders = array()) : void
Set blob properties
All available properties are listed at http://msdn.microsoft.com/en-us/library/ee691966.aspx and should be provided in the $additionalHeaders parameter.
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$leaseId | string | Lease identifier |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


setContainerAcl(string $containerName = '', bool $acl = self::ACL_PRIVATE, array $signedIdentifiers = array()) : void
Set container ACL
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$acl | bool | Zend_Service_WindowsAzure_Storage_Blob::ACL_* |
$signedIdentifiers | array | Signed identifiers |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


setContainerMetadata(string $containerName = '', array $metadata = array(), array $additionalHeaders = array()) : void
Set container metadata
Calling the Set Container Metadata operation overwrites all existing metadata that is associated with the container. It's not possible to modify an individual name/value pair.
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$metadata | array | Key/value pairs of meta data |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


setCredentials(\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) : void
Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
Inherited from: \Zend_Service_WindowsAzure_Storage::setCredentials()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
Inherited from: \Zend_Service_WindowsAzure_Storage::setHttpClientChannel()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
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
Inherited from: \Zend_Service_WindowsAzure_Storage::setRetryPolicy()Name | Type | Description |
---|---|---|
$retryPolicy | \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract | Retry policy to use when making requests |


snapshotBlob(string $containerName = '', string $blobName = '', array $metadata = array(), array $additionalHeaders = array()) : string
Snapshot blob
Name | Type | Description |
---|---|---|
$containerName | string | Container name |
$blobName | string | Blob name |
$metadata | array | Key/value pairs of meta data |
$additionalHeaders | array | Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. |
Type | Description |
---|---|
string | Date/Time value representing the snapshot identifier. |
Exception | Description |
---|---|
\Zend_Service_WindowsAzure_Exception |


unregisterAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob
Unregister this object as stream wrapper client
Name | Type | Description |
---|---|---|
$name | string | Protocol name |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_Blob |


unregisterStreamWrapper(string $name = 'azure') : \Zend_Service_WindowsAzure_Storage_Blob
Unregister this object as stream wrapper
Name | Type | Description |
---|---|---|
$name | string | Protocol name |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Storage_Blob |