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

Constant  ACL_PRIVATE = null

ACL - Private access

Constant  ACL_PUBLIC = 'container'

ACL - Public access (read all blobs)

Deprecated
Use ACL_PUBLIC_CONTAINER or ACL_PUBLIC_BLOB instead.  
Constant  ACL_PUBLIC_BLOB = 'blob'

ACL - Blob Public access (read all blobs)

Constant  ACL_PUBLIC_CONTAINER = 'container'

ACL - Container Public access (enumerate and read all blobs)

Constant  LEASE_ACQUIRE = 'acquire'

Blob lease constants

Constant  LEASE_RENEW = 'renew'
Constant  LEASE_RELEASE = 'release'
Constant  LEASE_BREAK = 'break'
Constant  MAX_BLOB_SIZE = 67108864

Maximal blob size (in bytes)

Constant  MAX_BLOB_TRANSFER_SIZE = 4194304

Maximal blob transfer size (in bytes)

Constant  BLOBTYPE_BLOCK = 'BlockBlob'

Blob types

Constant  BLOBTYPE_PAGE = 'PageBlob'
Constant  PAGE_WRITE_UPDATE = 'update'

Put page write options

Constant  PAGE_WRITE_CLEAR = 'clear'
Constant  URL_DEV_BLOB = "127.0.0.1:10000"
inherited

Development storage URLS

Inherited from: \Zend_Service_WindowsAzure_Storage::URL_DEV_BLOB
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"
inherited

Live storage URLS

Inherited from: \Zend_Service_WindowsAzure_Storage::URL_CLOUD_BLOB
Constant  URL_CLOUD_QUEUE = "queue.core.windows.net"
Constant  URL_CLOUD_TABLE = "table.core.windows.net"
Constant  RESOURCE_UNKNOWN = "unknown"
inherited

Resource types

Inherited from: \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN
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-"
inherited

HTTP header prefixes

Inherited from: \Zend_Service_WindowsAzure_Storage::PREFIX_PROPERTIES
Constant  PREFIX_METADATA = "x-ms-meta-"
Constant  PREFIX_STORAGE_HEADER = "x-ms-"

Properties

Propertyprotectedstring $_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  
Propertyprotectedstring $_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  
Propertyprotectedstring $_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  
Propertyprotected\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $_credentials = null
inherited

Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_credentials
Propertyprotectedstring $_host = ''
inherited

Storage host name

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_host
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_host  
Propertyprotected\Zend_Http_Client $_httpClientChannel = null
inherited

Zend_Http_Client channel used for communication with REST services

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_httpClientChannel
Default valuenullDetails
Type
\Zend_Http_Client
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_httpClientChannel  
Propertyprotectedstring $_proxyCredentials = ''
inherited

Proxy credentials

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyCredentials
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyCredentials  
Propertyprotectedint $_proxyPort = 80
inherited

Proxy port

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyPort
Default value80Details
Type
int
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyPort  
Propertyprotectedstring $_proxyUrl = ''
inherited

Proxy url

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_proxyUrl
Default value''Details
Type
string
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_proxyUrl  
Propertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
inherited

Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_retryPolicy
Propertyprotected\Zend_Service_WindowsAzure_Credentials_SharedAccessSignature $_sharedAccessSignatureCredentials = null

SharedAccessSignature credentials

Propertyprotectedboolean $_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  
Propertyprotectedboolean $_useProxy = false
inherited

Use proxy?

Inherited from: \Zend_Service_WindowsAzure_Storage::$$_useProxy
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Service_WindowsAzure_Storage::$$_useProxy  
Propertyprotectedarray $_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
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_generateBlockId(int $part = 0) : string

Generate block id

Parameters
Name Type Description
$part int

Block number

Returns
Type Description
string Windows Azure Blob Storage block number
methodprotected_generateMetadataHeaders(array $metadata = array()) : \HTTP
inherited

Generate metadata headers

Inherited from: \Zend_Service_WindowsAzure_Storage::_generateMetadataHeaders()
Parameters
Name Type Description
$metadata array
Returns
Type Description
\HTTP headers containing metadata
methodprotected_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string

Get error message from Zend_Http_Response

Parameters
Name Type Description
$response \Zend_Http_Response

Repsonse

$alternativeError string

Alternative error message

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

Parse metadata XML

Inherited from: \Zend_Service_WindowsAzure_Storage::_parseMetadataElement()
Parameters
Name Type Description
$element
Returns
Type Description
array
methodprotected_parseMetadataHeaders(array $headers = array()) : array
inherited

Parse metadata headers

Inherited from: \Zend_Service_WindowsAzure_Storage::_parseMetadataHeaders()
Parameters
Name Type Description
$headers array

HTTP headers containing metadata

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

Parse result from Zend_Http_Response

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

Perform request using Zend_Http_Client channel

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

Check if a blob exists

Parameters
Name Type Description
$containerName string

Container name

$blobName string

Blob name

$snapshotId string

Snapshot identifier

Returns
Type Description
boolean
methodpubliccontainerExists(string $containerName = '') : boolean

Check if a container exists

Parameters
Name Type Description
$containerName string

Container name

Returns
Type Description
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
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.

Returns
Type Description
object Partial blob properties
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpubliccreateContainer(string $containerName = '', array $metadata = array()) : object

Create container

Parameters
Name Type Description
$containerName string

Container name

$metadata array

Key/value pairs of meta data

Returns
Type Description
object Container properties
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpubliccreateContainerIfNotExists(string $containerName = '', array $metadata = array()) : void

Create container if it does not exist

Parameters
Name Type Description
$containerName string

Container name

$metadata array

Key/value pairs of meta data

Throws
Exception Description
\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
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.

Returns
Type Description
object Partial blob properties
Throws
Exception Description
\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
Name Type Description
$queryString array

Array of elements

Returns
Type Description
string Assembled query string
methodpubliccreateResourceName(string $containerName = '', string $blobName = '') : string
static

Create resource name

Parameters
Name Type Description
$containerName string

Container name

$blobName string

Blob name

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

Delete blob

Parameters
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.

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

Delete container

Parameters
Name Type Description
$containerName string

Container name

$additionalHeaders array

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

Throws
Exception Description
\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
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

Returns
Type Description
string
methodpublicgetAccountName() : string
inherited

Returns the Windows Azure account name

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

Get base URL for creating requests

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

Get blob

Parameters
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.

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

Get blob data

Parameters
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.

Returns
Type Description
mixed Blob contents
Throws
Exception Description
\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
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.

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

Get blob metadata

Parameters
Name Type Description
$containerName string

Container name

$blobName string

Blob name

$snapshotId string

Snapshot identifier

$leaseId string

Lease identifier

Returns
Type Description
array Key/value pairs of meta data
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicgetBlobProperties(string $containerName = '', string $blobName = '', string $snapshotId = null, string $leaseId = null) : \Zend_Service_WindowsAzure_Storage_BlobInstance

Get blob properties

Parameters
Name Type Description
$containerName string

Container name

$blobName string

Blob name

$snapshotId string

Snapshot identifier

$leaseId string

Lease identifier

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

Get block list

Parameters
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

Returns
Type Description
array
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainer(string $containerName = '') : \Zend_Service_WindowsAzure_Storage_BlobContainer

Get container

Parameters
Name Type Description
$containerName string

Container name

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_BlobContainer
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainerAcl(string $containerName = '', bool $signedIdentifiers = false) : string

Get container ACL

Parameters
Name Type Description
$containerName string

Container name

$signedIdentifiers bool

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

Returns
Type Description
string Acl, to be compared with Zend_Service_WindowsAzure_Storage_Blob::ACL_*
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicgetContainerMetadata(string $containerName = '') : array

Get container metadata

Parameters
Name Type Description
$containerName string

Container name

Returns
Type Description
array Key/value pairs of meta data
Throws
Exception Description
\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()
Returns
Type Description
\Zend_Http_Client_Adapter_Interface
methodpublicgetPageRegions(string $containerName = '', string $blobName = '', int $startByteOffset = 0, int $endByteOffset = 0, string $leaseId = null) : array

Put page in page blob

Parameters
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

Returns
Type Description
array Array of page ranges
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicgetWrapperClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob
static

Get wrapper client for stream type

Parameters
Name Type Description
$name string

Protocol name

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

Is valid container name?

Parameters
Name Type Description
$containerName string

Container name

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

Is valid metadata name?

Inherited from: \Zend_Service_WindowsAzure_Storage::isValidMetadataName()
Parameters
Name Type Description
$metadataName string

Metadata name

Returns
Type Description
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
Name Type Description
$timestamp int
Returns
Type Description
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
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.

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_LeaseInstance Lease instance
Throws
Exception Description
\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
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)

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

List containers

Parameters
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)

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

Put blob

Parameters
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.

Returns
Type Description
object Partial blob properties
Throws
Exception Description
\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
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.

Returns
Type Description
object Partial blob properties
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicputBlock(string $containerName = '', string $blobName = '', string $identifier = '', array $contents = '', string $leaseId = null) : void

Put large blob block

Parameters
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

Throws
Exception Description
\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
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.

Throws
Exception Description
\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
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.

Returns
Type Description
object Partial blob properties
Throws
Exception Description
\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
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.

Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicregisterAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob

Register this object as stream wrapper client

Parameters
Name Type Description
$name string

Protocol name

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

Register this object as stream wrapper

Parameters
Name Type Description
$name string

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

Throws
Exception Description
\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
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.

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

Set container ACL

Parameters
Name Type Description
$containerName string

Container name

$acl bool

Zend_Service_WindowsAzure_Storage_Blob::ACL_*

$signedIdentifiers array

Signed identifiers

Throws
Exception Description
\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
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.

Throws
Exception Description
\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
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
inherited

Set the HTTP client channel to use

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

Set proxy

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

Set retry policy to use when making requests

Inherited from: \Zend_Service_WindowsAzure_Storage::setRetryPolicy()
Parameters
Name Type Description
$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
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.

Returns
Type Description
string Date/Time value representing the snapshot identifier.
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicunregisterAsClient(string $name) : \Zend_Service_WindowsAzure_Storage_Blob

Unregister this object as stream wrapper client

Parameters
Name Type Description
$name string

Protocol name

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

Unregister this object as stream wrapper

Parameters
Name Type Description
$name string

Protocol name

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_Blob
methodpublicurlencode(string $value) : string
staticinherited

URL encode function

Inherited from: \Zend_Service_WindowsAzure_Storage::urlencode()
Parameters
Name Type Description
$value string

Value to encode

Returns
Type Description
string Encoded value
Documentation was generated by phpDocumentor 2.0.0a8.