Service/WindowsAzure/Storage/Blob.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 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

Package: Zend\Service\WindowsAzure\Storage
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

>VConstant  ACL_PRIVATE = null
ACL - Private access
>VConstant  ACL_PUBLIC = 'container'
ACL - Public access (read all blobs)
Deprecated
Use ACL_PUBLIC_CONTAINER or ACL_PUBLIC_BLOB instead.  
>VConstant  ACL_PUBLIC_BLOB = 'blob'
ACL - Blob Public access (read all blobs)
>VConstant  ACL_PUBLIC_CONTAINER = 'container'
ACL - Container Public access (enumerate and read all blobs)
>VConstant  LEASE_ACQUIRE = 'acquire'
Blob lease constants
>VConstant  LEASE_RENEW = 'renew'
>VConstant  LEASE_RELEASE = 'release'
>VConstant  LEASE_BREAK = 'break'
>VConstant  MAX_BLOB_SIZE = 67108864
Maximal blob size (in bytes)
>VConstant  MAX_BLOB_TRANSFER_SIZE = 4194304
Maximal blob transfer size (in bytes)
>VConstant  BLOBTYPE_BLOCK = 'BlockBlob'
Blob types
>VConstant  BLOBTYPE_PAGE = 'PageBlob'
>VConstant  PAGE_WRITE_UPDATE = 'update'
Put page write options
>VConstant  PAGE_WRITE_CLEAR = 'clear'
>VConstant  URL_DEV_BLOB = "127.0.0.1:10000"
inherited
Development storage URLS
Inherited from: \Zend_Service_WindowsAzure_Storage::URL_DEV_BLOB
>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"
inherited
Live storage URLS
Inherited from: \Zend_Service_WindowsAzure_Storage::URL_CLOUD_BLOB
>VConstant  URL_CLOUD_QUEUE = "queue.core.windows.net"
>VConstant  URL_CLOUD_TABLE = "table.core.windows.net"
>VConstant  RESOURCE_UNKNOWN = "unknown"
inherited
Resource types
Inherited from: \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN
>VConstant  PREFIX_PROPERTIES = "x-ms-prop-"
inherited
HTTP header prefixes
Inherited from: \Zend_Service_WindowsAzure_Storage::PREFIX_PROPERTIES
>VConstant  PREFIX_METADATA = "x-ms-meta-"
>VConstant  PREFIX_STORAGE_HEADER = "x-ms-"

Properties

>VPropertyprotectedstring $_accountKey = ''
inherited
Account key for Windows Azure
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_accountKey
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_accountKey  
>VPropertyprotectedstring $_accountName = ''
inherited
Account name for Windows Azure
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_accountName
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_accountName  
>VPropertyprotectedstring $_apiVersion = '2009-09-19'
inherited
Current API version
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_apiVersion
Default value'2009-09-19'Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_apiVersion  
>VPropertyprotected\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $_credentials = null
inherited
Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_credentials
>VPropertyprotectedstring $_host = ''
inherited
Storage host name
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_host
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_host  
>VPropertyprotected\Zend_Http_Client $_httpClientChannel = null
inherited
Zend_Http_Client channel used for communication with REST services
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_httpClientChannel
>VPropertyprotectedstring $_proxyCredentials = ''
inherited
Proxy credentials
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyCredentials
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyCredentials  
>VPropertyprotectedint $_proxyPort = 80
inherited
Proxy port
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyPort
Default value80Details
Type
int
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyPort  
>VPropertyprotectedstring $_proxyUrl = ''
inherited
Proxy url
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyUrl
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyUrl  
>VPropertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
inherited
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_retryPolicy
>VPropertyprotected\Zend_Service_WindowsAzure_Credentials_SharedAccessSignature $_sharedAccessSignatureCredentials = null
SharedAccessSignature credentials
>VPropertyprotectedboolean $_usePathStyleUri = false
inherited
Use path-style URI's
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_usePathStyleUri
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_usePathStyleUri  
>VPropertyprotectedboolean $_useProxy = false
inherited
Use proxy?
Inherited from: \Zend_Service_WindowsAzure_Storage::$$_useProxy
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_useProxy  
>VPropertyprotectedarray $_wrapperClients = array()
static
Stream wrapper clients
Default valuearray()Details
Type
array

Methods

methodpublic__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

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_generateBlockId(int $part = 0) : string

Generate block id

Parameters
NameTypeDescription
$partint

Block number

Returns
TypeDescription
stringWindows Azure Blob Storage block number
methodprotected_generateMetadataHeaders(array $metadata = array()) : \HTTP
inherited

Generate metadata headers

Inherited from: \Zend_Service_WindowsAzure_Storage::_generateMetadataHeaders()
Parameters
NameTypeDescription
$metadataarray
Returns
TypeDescription
\HTTPheaders containing metadata
methodprotected_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string

Get error message from Zend_Http_Response

Parameters
NameTypeDescription
$response\Zend_Http_Response

Repsonse

$alternativeErrorstring

Alternative error message

Returns
TypeDescription
string
methodprotected_parseMetadataElement( $element = null) : array
inherited

Parse metadata XML

Inherited from: \Zend_Service_WindowsAzure_Storage::_parseMetadataElement()
Parameters
NameTypeDescription
$element
Returns
TypeDescription
array
methodprotected_parseMetadataHeaders(array $headers = array()) : array
inherited

Parse metadata headers

Inherited from: \Zend_Service_WindowsAzure_Storage::_parseMetadataHeaders()
Parameters
NameTypeDescription
$headersarray

HTTP headers containing metadata

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

Parse result from Zend_Http_Response

Inherited from: \Zend_Service_WindowsAzure_Storage::_parseResponse()
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
inherited

Perform request using Zend_Http_Client channel

Inherited from: \Zend_Service_WindowsAzure_Storage::_performRequest()
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
methodpublicblobExists(string $containerName = '', string $blobName = '', string $snapshotId = null) : boolean

Check if a blob exists

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

Returns
TypeDescription
boolean
methodpubliccontainerExists(string $containerName = '') : boolean

Check if a container exists

Parameters
NameTypeDescription
$containerNamestring

Container name

Returns
TypeDescription
boolean
methodpubliccopyBlob(string $sourceContainerName = '', string $sourceBlobName = '', string $destinationContainerName = '', string $destinationBlobName = '', array $metadata = array(), string $sourceSnapshotId = null, string $destinationLeaseId = null, array $additionalHeaders = array()) : object

Copy blob

Parameters
NameTypeDescription
$sourceContainerNamestring

Source container name

$sourceBlobNamestring

Source blob name

$destinationContainerNamestring

Destination container name

$destinationBlobNamestring

Destination blob name

$metadataarray

Key/value pairs of meta data

$sourceSnapshotIdstring

Source snapshot identifier

$destinationLeaseIdstring

Destination lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd894037.aspx for more information.

Returns
TypeDescription
objectPartial blob properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliccreateContainer(string $containerName = '', array $metadata = array()) : object

Create container

Parameters
NameTypeDescription
$containerNamestring

Container name

$metadataarray

Key/value pairs of meta data

Returns
TypeDescription
objectContainer properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliccreateContainerIfNotExists(string $containerName = '', array $metadata = array()) : void

Create container if it does not exist

Parameters
NameTypeDescription
$containerNamestring

Container name

$metadataarray

Key/value pairs of meta data

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliccreatePageBlob(string $containerName = '', string $blobName = '', int $size = 0, array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object

Create page blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$sizeint

Size of the page blob in bytes

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
objectPartial blob properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliccreateQueryStringFromArray(array $queryString) : string
staticinherited

Builds a query string from an array of elements

Inherited from: \Zend_Service_WindowsAzure_Storage::createQueryStringFromArray()
Parameters
NameTypeDescription
$queryStringarray

Array of elements

Returns
TypeDescription
stringAssembled query string
methodpubliccreateResourceName(string $containerName = '', string $blobName = '') : string
static

Create resource name

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

Returns
TypeDescription
string
methodpublicdeleteBlob(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : void

Delete blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicdeleteContainer(string $containerName = '', array $additionalHeaders = array()) : void

Delete container

Parameters
NameTypeDescription
$containerNamestring

Container name

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgenerateSharedAccessUrl(string $containerName = '', string $blobName = '', string $resource = 'b', string $permissions = 'r', string $start = '', string $expiry = '', string $identifier = '') : string

Generate shared access URL

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$resourcestring

Signed resource - container (c) - blob (b)

$permissionsstring

Signed permissions - read (r), write (w), delete (d) and list (l)

$startstring

The time at which the Shared Access Signature becomes valid.

$expirystring

The time at which the Shared Access Signature becomes invalid.

$identifierstring

Signed identifier

Returns
TypeDescription
string
methodpublicgetAccountName() : string
inherited

Returns the Windows Azure account name

Inherited from: \Zend_Service_WindowsAzure_Storage::getAccountName()
Returns
TypeDescription
string
methodpublicgetBaseUrl() : string
inherited

Get base URL for creating requests

Inherited from: \Zend_Service_WindowsAzure_Storage::getBaseUrl()
Returns
TypeDescription
string
methodpublicgetBlob(string $containerName = '', string $blobName = '', string $localFileName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : void

Get blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$localFileNamestring

Local file name to store downloaded blob

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlobData(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : mixed

Get blob data

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
mixedBlob contents
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlobInstance(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, array $additionalHeaders = array()) : \Zend_Service_WindowsAzure_Storage_BlobInstance

Get blob instance

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_BlobInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlobMetadata(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null) : array

Get blob metadata

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

Returns
TypeDescription
arrayKey/value pairs of meta data
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlobProperties(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null) : \Zend_Service_WindowsAzure_Storage_BlobInstance

Get blob properties

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_BlobInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlockList(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null, integer $type = 0) : array

Get block list

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$snapshotIdstring

Snapshot identifier

$leaseIdstring

Lease identifier

$typeinteger

Type of block list to retrieve. 0 = all, 1 = committed, 2 = uncommitted

Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainer(string $containerName = '') : \Zend_Service_WindowsAzure_Storage_BlobContainer

Get container

Parameters
NameTypeDescription
$containerNamestring

Container name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_BlobContainer
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainerAcl(string $containerName = '', bool $signedIdentifiers = false) : string

Get container ACL

Parameters
NameTypeDescription
$containerNamestring

Container name

$signedIdentifiersbool

Display only private/blob/container or display signed identifiers?

Returns
TypeDescription
stringAcl, to be compared with Zend_Service_WindowsAzure_Storage_Blob::ACL_*
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainerMetadata(string $containerName = '') : array

Get container metadata

Parameters
NameTypeDescription
$containerNamestring

Container name

Returns
TypeDescription
arrayKey/value pairs of meta data
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetCredentials() : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
inherited

Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Inherited from: \Zend_Service_WindowsAzure_Storage::getCredentials()
methodpublicgetHttpClientChannel() : \Zend_Http_Client_Adapter_Interface
inherited

Retrieve HTTP client channel

Inherited from: \Zend_Service_WindowsAzure_Storage::getHttpClientChannel()
methodpublicgetPageRegions(string $containerName = '', string $blobName = '', int $startByteOffset = 0, int $endByteOffset = 0, string $leaseId = null) : array

Put page in page blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$startByteOffsetint

Start byte offset

$endByteOffsetint

End byte offset

$leaseIdstring

Lease identifier

Returns
TypeDescription
arrayArray of page ranges
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetWrapperClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob
static

Get wrapper client for stream type

Parameters
NameTypeDescription
$namestring

Protocol name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_Blob
methodpublicisValidContainerName(string $containerName = '') : boolean
static

Is valid container name?

Parameters
NameTypeDescription
$containerNamestring

Container name

Returns
TypeDescription
boolean
methodpublicisValidMetadataName(string $metadataName = '') : boolean
staticinherited

Is valid metadata name?

Inherited from: \Zend_Service_WindowsAzure_Storage::isValidMetadataName()
Parameters
NameTypeDescription
$metadataNamestring

Metadata name

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

Generate ISO 8601 compliant date string in UTC time zone

Inherited from: \Zend_Service_WindowsAzure_Storage::isoDate()
Parameters
NameTypeDescription
$timestampint
Returns
TypeDescription
string
methodpublicleaseBlob(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)

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$leaseActionstring

Lease action (Zend_Service_WindowsAzure_Storage_Blob::LEASE_*)

$leaseIdstring

Lease identifier, required to renew the lease or to release the lease.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_LeaseInstanceLease instance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliclistBlobs(string $containerName = '', string $prefix = '', string $delimiter = '', int $maxResults = null, string $marker = null, string $include = null, int $currentResultCount = 0) : array

List blobs

Parameters
NameTypeDescription
$containerNamestring

Container name

$prefixstring

Optional. Filters the results to return only blobs whose name begins with the specified prefix.

$delimiterstring

Optional. Delimiter, i.e. '/', for specifying folder hierarchy

$maxResultsint

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)

$markerstring

Optional string value that identifies the portion of the list to be returned with the next list operation.

$includestring

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 (,)

$currentResultCountint

Current result count (internal use)

Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliclistContainers(string $prefix = null, int $maxResults = null, string $marker = null, string $include = null, int $currentResultCount = 0) : array

List containers

Parameters
NameTypeDescription
$prefixstring

Optional. Filters the results to return only containers whose name begins with the specified prefix.

$maxResultsint

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)

$markerstring

Optional string value that identifies the portion of the list to be returned with the next list operation.

$includestring

Optional. Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata')

$currentResultCountint

Current result count (internal use)

Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputBlob(string $containerName = '', string $blobName = '', string $localFileName = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object

Put blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$localFileNamestring

Local file name to be uploaded

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
objectPartial blob properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputBlobData(string $containerName = '', string $blobName = '', mixed $data = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object

Put blob data

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$datamixed

Data to store

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
objectPartial blob properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputBlock(string $containerName = '', string $blobName = '', string $identifier = '', array $contents = '', string $leaseId = null) : void

Put large blob block

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$identifierstring

Block ID

$contentsarray

Contents of the block

$leaseIdstring

Lease identifier

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputBlockList(string $containerName = '', string $blobName = '', array $blockList = array(), array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : void

Put block list

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$blockListarray

Array of block identifiers

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputLargeBlob(string $containerName = '', string $blobName = '', string $localFileName = '', array $metadata = array(), string $leaseId = null, array $additionalHeaders = array()) : object

Put large blob (> 64 MB)

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$localFileNamestring

Local file name to be uploaded

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
objectPartial blob properties
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicputPage(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

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$startByteOffsetint

Start byte offset

$endByteOffsetint

End byte offset

$contentsmixed

Page contents

$writeMethodstring

Write method (Zend_Service_WindowsAzure_Storage_Blob::PAGE_WRITE_*)

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicregisterAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob

Register this object as stream wrapper client

Parameters
NameTypeDescription
$namestring

Protocol name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_Blob
methodpublicregisterStreamWrapper(string $name = 'azure') : void

Register this object as stream wrapper

Parameters
NameTypeDescription
$namestring

Protocol name

methodpublicsetBlobMetadata(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.

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$metadataarray

Key/value pairs of meta data

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicsetBlobProperties(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.

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$leaseIdstring

Lease identifier

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicsetContainerAcl(string $containerName = '', bool $acl = self::ACL_PRIVATE, array $signedIdentifiers = array()) : void

Set container ACL

Parameters
NameTypeDescription
$containerNamestring

Container name

$aclbool

Zend_Service_WindowsAzure_Storage_Blob::ACL_*

$signedIdentifiersarray

Signed identifiers

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicsetContainerMetadata(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.

Parameters
NameTypeDescription
$containerNamestring

Container name

$metadataarray

Key/value pairs of meta data

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicsetCredentials(\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials) : void
inherited

Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Inherited from: \Zend_Service_WindowsAzure_Storage::setCredentials()
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
inherited

Set the HTTP client channel to use

Inherited from: \Zend_Service_WindowsAzure_Storage::setHttpClientChannel()
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
inherited

Set proxy

Inherited from: \Zend_Service_WindowsAzure_Storage::setProxy()
Parameters
NameTypeDescription
$useProxyboolean

Use proxy?

$proxyUrlstring

Proxy URL

$proxyPortint

Proxy port

$proxyCredentialsstring

Proxy credentials

methodpublicsetRetryPolicy(\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : void
inherited

Set retry policy to use when making requests

Inherited from: \Zend_Service_WindowsAzure_Storage::setRetryPolicy()
Parameters
NameTypeDescription
$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

methodpublicsnapshotBlob(string $containerName = '', string $blobName = '', array $metadata = array(), array $additionalHeaders = array()) : string

Snapshot blob

Parameters
NameTypeDescription
$containerNamestring

Container name

$blobNamestring

Blob name

$metadataarray

Key/value pairs of meta data

$additionalHeadersarray

Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

Returns
TypeDescription
stringDate/Time value representing the snapshot identifier.
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicunregisterAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob

Unregister this object as stream wrapper client

Parameters
NameTypeDescription
$namestring

Protocol name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_Blob
methodpublicunregisterStreamWrapper(string $name = 'azure') : \Zend_Service_WindowsAzure_Storage_Blob

Unregister this object as stream wrapper

Parameters
NameTypeDescription
$namestring

Protocol name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_Blob
methodpublicurlencode(string $value) : string
staticinherited

URL encode function

Inherited from: \Zend_Service_WindowsAzure_Storage::urlencode()
Parameters
NameTypeDescription
$valuestring

Value to encode

Returns
TypeDescription
stringEncoded value
Documentation was generated by phpDocumentor 2.0.0a12.