Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_Service_WindowsAzure_Storage_Blob Class Reference

Public Member Functions

 __construct ($host=Zend_Service_WindowsAzure_Storage::URL_DEV_BLOB, $accountName=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri=false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Storage_Blob instance.
 
 blobExists ($containerName= '', $blobName= '', $snapshotId=null)
 Check if a blob exists.
 
 containerExists ($containerName= '')
 Check if a container exists.
 
 createContainer ($containerName= '', $metadata=array())
 Create container.
 
 createContainerIfNotExists ($containerName= '', $metadata=array())
 Create container if it does not exist.
 
 getContainerAcl ($containerName= '', $signedIdentifiers=false)
 Get container ACL.
 
 setContainerAcl ($containerName= '', $acl=self::ACL_PRIVATE, $signedIdentifiers=array())
 Set container ACL.
 
 getContainer ($containerName= '')
 Get container.
 
 getContainerMetadata ($containerName= '')
 Get container metadata.
 
 setContainerMetadata ($containerName= '', $metadata=array(), $additionalHeaders=array())
 Set container metadata.
 
 deleteContainer ($containerName= '', $additionalHeaders=array())
 Delete container.
 
 listContainers ($prefix=null, $maxResults=null, $marker=null, $include=null, $currentResultCount=0)
 List containers.
 
 putBlob ($containerName= '', $blobName= '', $localFileName= '', $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Put blob.
 
 putBlobData ($containerName= '', $blobName= '', $data= '', $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Put blob data.
 
 putLargeBlob ($containerName= '', $blobName= '', $localFileName= '', $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Put large blob (> 64 MB)
 
 putBlock ($containerName= '', $blobName= '', $identifier= '', $contents= '', $leaseId=null)
 Put large blob block.
 
 putBlockList ($containerName= '', $blobName= '', $blockList=array(), $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Put block list.
 
 getBlockList ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null, $type=0)
 Get block list.
 
 createPageBlob ($containerName= '', $blobName= '', $size=0, $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Create page blob.
 
 putPage ($containerName= '', $blobName= '', $startByteOffset=0, $endByteOffset=0, $contents= '', $writeMethod=self::PAGE_WRITE_UPDATE, $leaseId=null, $additionalHeaders=array())
 Put page in page blob.
 
 getPageRegions ($containerName= '', $blobName= '', $startByteOffset=0, $endByteOffset=0, $leaseId=null)
 Put page in page blob.
 
 copyBlob ($sourceContainerName= '', $sourceBlobName= '', $destinationContainerName= '', $destinationBlobName= '', $metadata=array(), $sourceSnapshotId=null, $destinationLeaseId=null, $additionalHeaders=array())
 Copy blob.
 
 getBlob ($containerName= '', $blobName= '', $localFileName= '', $snapshotId=null, $leaseId=null, $additionalHeaders=array())
 Get blob.
 
 getBlobData ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null, $additionalHeaders=array())
 Get blob data.
 
 getBlobInstance ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null, $additionalHeaders=array())
 Get blob instance.
 
 getBlobMetadata ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null)
 Get blob metadata.
 
 setBlobMetadata ($containerName= '', $blobName= '', $metadata=array(), $leaseId=null, $additionalHeaders=array())
 Set blob metadata.
 
 setBlobProperties ($containerName= '', $blobName= '', $leaseId=null, $additionalHeaders=array())
 Set blob properties.
 
 getBlobProperties ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null)
 Get blob properties.
 
 deleteBlob ($containerName= '', $blobName= '', $snapshotId=null, $leaseId=null, $additionalHeaders=array())
 Delete blob.
 
 snapshotBlob ($containerName= '', $blobName= '', $metadata=array(), $additionalHeaders=array())
 Snapshot blob.
 
 leaseBlob ($containerName= '', $blobName= '', $leaseAction=self::LEASE_ACQUIRE, $leaseId=null)
 Lease blob - See (http://msdn.microsoft.com/en-us/library/ee691972.aspx)
 
 listBlobs ($containerName= '', $prefix= '', $delimiter= '', $maxResults=null, $marker=null, $include=null, $currentResultCount=0)
 List blobs.
 
 generateSharedAccessUrl ($containerName= '', $blobName= '', $resource= 'b', $permissions= 'r', $start= '', $expiry= '', $identifier= '')
 Generate shared access URL.
 
 registerAsClient ($name)
 Register this object as stream wrapper client.
 
 unregisterAsClient ($name)
 Unregister this object as stream wrapper client.
 
 registerStreamWrapper ($name= 'azure')
 Register this object as stream wrapper.
 
 unregisterStreamWrapper ($name= 'azure')
 Unregister this object as stream wrapper.
 
- Public Member Functions inherited from Zend_Service_WindowsAzure_Storage
 __construct ($host=self::URL_DEV_BLOB, $accountName=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri=false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Storage instance.
 
 setHttpClientChannel ($adapterInstance= 'Zend_Http_Client_Adapter_Proxy')
 Set the HTTP client channel to use.
 
 getHttpClientChannel ()
 Retrieve HTTP client channel.
 
 setRetryPolicy (Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Set retry policy to use when making requests.
 
 setProxy ($useProxy=false, $proxyUrl= '', $proxyPort=80, $proxyCredentials= '')
 Set proxy.
 
 getAccountName ()
 Returns the Windows Azure account name.
 
 getBaseUrl ()
 Get base URL for creating requests.
 
 setCredentials (Zend_Service_WindowsAzure_Credentials_CredentialsAbstract $credentials)
 Set Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance.
 
 getCredentials ()
 Get Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance.
 
 isoDate ($timestamp=null)
 Generate ISO 8601 compliant date string in UTC time zone.
 

Static Public Member Functions

static getWrapperClient ($name)
 Get wrapper client for stream type.
 
static createResourceName ($containerName= '', $blobName= '')
 Create resource name.
 
static isValidContainerName ($containerName= '')
 Is valid container name?
 
- Static Public Member Functions inherited from Zend_Service_WindowsAzure_Storage
static urlencode ($value)
 URL encode function.
 
static isValidMetadataName ($metadataName= '')
 Is valid metadata name?
 
static createQueryStringFromArray ($queryString)
 Builds a query string from an array of elements.
 

Public Attributes

const ACL_PRIVATE = null
 ACL - Private access.
 
const ACL_PUBLIC = 'container'
 ACL - Public access (read all blobs)
 
const ACL_PUBLIC_BLOB = 'blob'
 ACL - Blob Public access (read all blobs)
 
const ACL_PUBLIC_CONTAINER = 'container'
 ACL - Container Public access (enumerate and read all blobs)
 
const LEASE_ACQUIRE = 'acquire'
 Blob lease constants.
 
const LEASE_RENEW = 'renew'
 
const LEASE_RELEASE = 'release'
 
const LEASE_BREAK = 'break'
 
const MAX_BLOB_SIZE = 67108864
 Maximal blob size (in bytes)
 
const MAX_BLOB_TRANSFER_SIZE = 4194304
 Maximal blob transfer size (in bytes)
 
const BLOBTYPE_BLOCK = 'BlockBlob'
 Blob types.
 
const BLOBTYPE_PAGE = 'PageBlob'
 
const PAGE_WRITE_UPDATE = 'update'
 Put page write options.
 
const PAGE_WRITE_CLEAR = 'clear'
 
- Public Attributes inherited from Zend_Service_WindowsAzure_Storage
const URL_DEV_BLOB = "127.0.0.1:10000"
 Development storage URLS.
 
const URL_DEV_QUEUE = "127.0.0.1:10001"
 
const URL_DEV_TABLE = "127.0.0.1:10002"
 
const URL_CLOUD_BLOB = "blob.core.windows.net"
 Live storage URLS.
 
const URL_CLOUD_QUEUE = "queue.core.windows.net"
 
const URL_CLOUD_TABLE = "table.core.windows.net"
 
const RESOURCE_UNKNOWN = "unknown"
 Resource types.
 
const RESOURCE_CONTAINER = "c"
 
const RESOURCE_BLOB = "b"
 
const RESOURCE_TABLE = "t"
 
const RESOURCE_ENTITY = "e"
 
const RESOURCE_QUEUE = "q"
 
const PREFIX_PROPERTIES = "x-ms-prop-"
 HTTP header prefixes.
 
const PREFIX_METADATA = "x-ms-meta-"
 
const PREFIX_STORAGE_HEADER = "x-ms-"
 

Protected Member Functions

 _getErrorMessage (Zend_Http_Response $response, $alternativeError= 'Unknown error.')
 Get error message from Zend_Http_Response.
 
 _generateBlockId ($part=0)
 Generate block id.
 
- Protected Member Functions inherited from Zend_Service_WindowsAzure_Storage
 _performRequest ($path= '/', $queryString= '', $httpVerb=Zend_Http_Client::GET, $headers=array(), $forTableStorage=false, $rawData=null, $resourceType=Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ)
 Perform request using Zend_Http_Client channel.
 
 _parseResponse (Zend_Http_Response $response=null)
 Parse result from Zend_Http_Response.
 
 _generateMetadataHeaders ($metadata=array())
 Generate metadata headers.
 
 _parseMetadataHeaders ($headers=array())
 Parse metadata headers.
 
 _parseMetadataElement ($element=null)
 Parse metadata XML.
 

Protected Attributes

 $_sharedAccessSignatureCredentials = null
 
- Protected Attributes inherited from Zend_Service_WindowsAzure_Storage
 $_apiVersion = '2009-09-19'
 
 $_host = ''
 
 $_accountName = ''
 
 $_accountKey = ''
 
 $_usePathStyleUri = false
 
 $_credentials = null
 
 $_retryPolicy = null
 
 $_httpClientChannel = null
 
 $_useProxy = false
 
 $_proxyUrl = ''
 
 $_proxyPort = 80
 
 $_proxyCredentials = ''
 

Static Protected Attributes

static $_wrapperClients = array()
 

Constructor & Destructor Documentation

Creates a new Zend_Service_WindowsAzure_Storage_Blob instance.

Parameters
string$hostStorage host name
string$accountNameAccount name for Windows Azure
string$accountKeyAccount key for Windows Azure
boolean$usePathStyleUriUse path-style URI's
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract$retryPolicyRetry policy to use when making requests

Member Function Documentation

_generateBlockId (   $part = 0)
protected

Generate block id.

Parameters
int$partBlock number
Returns
string Windows Azure Blob Storage block number
_getErrorMessage ( Zend_Http_Response  $response,
  $alternativeError = 'Unknown error.' 
)
protected

Get error message from Zend_Http_Response.

Parameters
Zend_Http_Response$responseRepsonse
string$alternativeErrorAlternative error message
Returns
string
blobExists (   $containerName = '',
  $blobName = '',
  $snapshotId = null 
)

Check if a blob exists.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
Returns
boolean
containerExists (   $containerName = '')

Check if a container exists.

Parameters
string$containerNameContainer name
Returns
boolean
copyBlob (   $sourceContainerName = '',
  $sourceBlobName = '',
  $destinationContainerName = '',
  $destinationBlobName = '',
  $metadata = array(),
  $sourceSnapshotId = null,
  $destinationLeaseId = null,
  $additionalHeaders = array() 
)

Copy blob.

Parameters
string$sourceContainerNameSource container name
string$sourceBlobNameSource blob name
string$destinationContainerNameDestination container name
string$destinationBlobNameDestination blob name
array$metadataKey/value pairs of meta data
string$sourceSnapshotIdSource snapshot identifier
string$destinationLeaseIdDestination lease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd894037.aspx for more information.
Returns
object Partial blob properties
Exceptions
Zend_Service_WindowsAzure_Exception
createContainer (   $containerName = '',
  $metadata = array() 
)

Create container.

Parameters
string$containerNameContainer name
array$metadataKey/value pairs of meta data
Returns
object Container properties
Exceptions
Zend_Service_WindowsAzure_Exception
createContainerIfNotExists (   $containerName = '',
  $metadata = array() 
)

Create container if it does not exist.

Parameters
string$containerNameContainer name
array$metadataKey/value pairs of meta data
Exceptions
Zend_Service_WindowsAzure_Exception
createPageBlob (   $containerName = '',
  $blobName = '',
  $size = 0,
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

Create page blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
int$sizeSize of the page blob in bytes
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
object Partial blob properties
Exceptions
Zend_Service_WindowsAzure_Exception
static createResourceName (   $containerName = '',
  $blobName = '' 
)
static

Create resource name.

Parameters
string$containerNameContainer name
string$blobNameBlob name
Returns
string
deleteBlob (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null,
  $additionalHeaders = array() 
)

Delete blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
deleteContainer (   $containerName = '',
  $additionalHeaders = array() 
)

Delete container.

Parameters
string$containerNameContainer name
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
generateSharedAccessUrl (   $containerName = '',
  $blobName = '',
  $resource = 'b',
  $permissions = 'r',
  $start = '',
  $expiry = '',
  $identifier = '' 
)

Generate shared access URL.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$resourceSigned resource - container (c) - blob (b)
string$permissionsSigned permissions - read (r), write (w), delete (d) and list (l)
string$startThe time at which the Shared Access Signature becomes valid.
string$expiryThe time at which the Shared Access Signature becomes invalid.
string$identifierSigned identifier
Returns
string
getBlob (   $containerName = '',
  $blobName = '',
  $localFileName = '',
  $snapshotId = null,
  $leaseId = null,
  $additionalHeaders = array() 
)

Get blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$localFileNameLocal file name to store downloaded blob
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
getBlobData (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null,
  $additionalHeaders = array() 
)

Get blob data.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
mixed Blob contents
Exceptions
Zend_Service_WindowsAzure_Exception
getBlobInstance (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null,
  $additionalHeaders = array() 
)

Get blob instance.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
Zend_Service_WindowsAzure_Storage_BlobInstance
Exceptions
Zend_Service_WindowsAzure_Exception
getBlobMetadata (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null 
)

Get blob metadata.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
Returns
array Key/value pairs of meta data
Exceptions
Zend_Service_WindowsAzure_Exception
getBlobProperties (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null 
)

Get blob properties.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
Returns
Zend_Service_WindowsAzure_Storage_BlobInstance
Exceptions
Zend_Service_WindowsAzure_Exception
getBlockList (   $containerName = '',
  $blobName = '',
  $snapshotId = null,
  $leaseId = null,
  $type = 0 
)

Get block list.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$snapshotIdSnapshot identifier
string$leaseIdLease identifier
integer$typeType of block list to retrieve. 0 = all, 1 = committed, 2 = uncommitted
Returns
array
Exceptions
Zend_Service_WindowsAzure_Exception
getContainer (   $containerName = '')

Get container.

Parameters
string$containerNameContainer name
Returns
Zend_Service_WindowsAzure_Storage_BlobContainer
Exceptions
Zend_Service_WindowsAzure_Exception
getContainerAcl (   $containerName = '',
  $signedIdentifiers = false 
)

Get container ACL.

Parameters
string$containerNameContainer name
bool$signedIdentifiersDisplay only private/blob/container or display signed identifiers?
Returns
string Acl, to be compared with Zend_Service_WindowsAzure_Storage_Blob::ACL_*
Exceptions
Zend_Service_WindowsAzure_Exception
getContainerMetadata (   $containerName = '')

Get container metadata.

Parameters
string$containerNameContainer name
Returns
array Key/value pairs of meta data
Exceptions
Zend_Service_WindowsAzure_Exception
getPageRegions (   $containerName = '',
  $blobName = '',
  $startByteOffset = 0,
  $endByteOffset = 0,
  $leaseId = null 
)

Put page in page blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
int$startByteOffsetStart byte offset
int$endByteOffsetEnd byte offset
string$leaseIdLease identifier
Returns
array Array of page ranges
Exceptions
Zend_Service_WindowsAzure_Exception
static getWrapperClient (   $name)
static

Get wrapper client for stream type.

Parameters
string$nameProtocol name
Returns
Zend_Service_WindowsAzure_Storage_Blob
static isValidContainerName (   $containerName = '')
static

Is valid container name?

Parameters
string$containerNameContainer name
Returns
boolean
leaseBlob (   $containerName = '',
  $blobName = '',
  $leaseAction = self::LEASE_ACQUIRE,
  $leaseId = null 
)

Lease blob - See (http://msdn.microsoft.com/en-us/library/ee691972.aspx)

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$leaseActionLease action (Zend_Service_WindowsAzure_Storage_Blob::LEASE_*)
string$leaseIdLease identifier, required to renew the lease or to release the lease.
Returns
Zend_Service_WindowsAzure_Storage_LeaseInstance Lease instance
Exceptions
Zend_Service_WindowsAzure_Exception
listBlobs (   $containerName = '',
  $prefix = '',
  $delimiter = '',
  $maxResults = null,
  $marker = null,
  $include = null,
  $currentResultCount = 0 
)

List blobs.

Parameters
string$containerNameContainer name
string$prefixOptional. Filters the results to return only blobs whose name begins with the specified prefix.
string$delimiterOptional. Delimiter, i.e. '/', for specifying folder hierarchy
int$maxResultsOptional. 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)
string$markerOptional string value that identifies the portion of the list to be returned with the next list operation.
string$includeOptional. 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 (,)
int$currentResultCountCurrent result count (internal use)
Returns
array
Exceptions
Zend_Service_WindowsAzure_Exception
listContainers (   $prefix = null,
  $maxResults = null,
  $marker = null,
  $include = null,
  $currentResultCount = 0 
)

List containers.

Parameters
string$prefixOptional. Filters the results to return only containers whose name begins with the specified prefix.
int$maxResultsOptional. 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)
string$markerOptional string value that identifies the portion of the list to be returned with the next list operation.
string$includeOptional. Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata')
int$currentResultCountCurrent result count (internal use)
Returns
array
Exceptions
Zend_Service_WindowsAzure_Exception
putBlob (   $containerName = '',
  $blobName = '',
  $localFileName = '',
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

Put blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$localFileNameLocal file name to be uploaded
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
object Partial blob properties
Exceptions
Zend_Service_WindowsAzure_Exception
putBlobData (   $containerName = '',
  $blobName = '',
  $data = '',
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

Put blob data.

Parameters
string$containerNameContainer name
string$blobNameBlob name
mixed$dataData to store
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
object Partial blob properties
Exceptions
Zend_Service_WindowsAzure_Exception
putBlock (   $containerName = '',
  $blobName = '',
  $identifier = '',
  $contents = '',
  $leaseId = null 
)

Put large blob block.

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$identifierBlock ID
array$contentsContents of the block
string$leaseIdLease identifier
Exceptions
Zend_Service_WindowsAzure_Exception
putBlockList (   $containerName = '',
  $blobName = '',
  $blockList = array(),
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

Put block list.

Parameters
string$containerNameContainer name
string$blobNameBlob name
array$blockListArray of block identifiers
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
putLargeBlob (   $containerName = '',
  $blobName = '',
  $localFileName = '',
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

Put large blob (> 64 MB)

Parameters
string$containerNameContainer name
string$blobNameBlob name
string$localFileNameLocal file name to be uploaded
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
object Partial blob properties
Exceptions
Zend_Service_WindowsAzure_Exception
putPage (   $containerName = '',
  $blobName = '',
  $startByteOffset = 0,
  $endByteOffset = 0,
  $contents = '',
  $writeMethod = self::PAGE_WRITE_UPDATE,
  $leaseId = null,
  $additionalHeaders = array() 
)

Put page in page blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
int$startByteOffsetStart byte offset
int$endByteOffsetEnd byte offset
mixed$contentsPage contents
string$writeMethodWrite method (Zend_Service_WindowsAzure_Storage_Blob::PAGE_WRITE_*)
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
registerAsClient (   $name)

Register this object as stream wrapper client.

Parameters
string$nameProtocol name
Returns
Zend_Service_WindowsAzure_Storage_Blob
registerStreamWrapper (   $name = 'azure')

Register this object as stream wrapper.

Parameters
string$nameProtocol name
setBlobMetadata (   $containerName = '',
  $blobName = '',
  $metadata = array(),
  $leaseId = null,
  $additionalHeaders = array() 
)

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
string$containerNameContainer name
string$blobNameBlob name
array$metadataKey/value pairs of meta data
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
setBlobProperties (   $containerName = '',
  $blobName = '',
  $leaseId = null,
  $additionalHeaders = array() 
)

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
string$containerNameContainer name
string$blobNameBlob name
string$leaseIdLease identifier
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
setContainerAcl (   $containerName = '',
  $acl = self::ACL_PRIVATE,
  $signedIdentifiers = array() 
)

Set container ACL.

Parameters
string$containerNameContainer name
bool$aclZend_Service_WindowsAzure_Storage_Blob::ACL_*
array$signedIdentifiersSigned identifiers
Exceptions
Zend_Service_WindowsAzure_Exception
setContainerMetadata (   $containerName = '',
  $metadata = array(),
  $additionalHeaders = array() 
)

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
string$containerNameContainer name
array$metadataKey/value pairs of meta data
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions
Zend_Service_WindowsAzure_Exception
snapshotBlob (   $containerName = '',
  $blobName = '',
  $metadata = array(),
  $additionalHeaders = array() 
)

Snapshot blob.

Parameters
string$containerNameContainer name
string$blobNameBlob name
array$metadataKey/value pairs of meta data
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Returns
string Date/Time value representing the snapshot identifier.
Exceptions
Zend_Service_WindowsAzure_Exception
unregisterAsClient (   $name)

Unregister this object as stream wrapper client.

Parameters
string$nameProtocol name
Returns
Zend_Service_WindowsAzure_Storage_Blob
unregisterStreamWrapper (   $name = 'azure')

Unregister this object as stream wrapper.

Parameters
string$nameProtocol name
Returns
Zend_Service_WindowsAzure_Storage_Blob

Member Data Documentation

$_sharedAccessSignatureCredentials = null
protected
$_wrapperClients = array()
staticprotected
const ACL_PRIVATE = null

ACL - Private access.

const ACL_PUBLIC = 'container'

ACL - Public access (read all blobs)

Deprecated:
Use ACL_PUBLIC_CONTAINER or ACL_PUBLIC_BLOB instead.
const ACL_PUBLIC_BLOB = 'blob'

ACL - Blob Public access (read all blobs)

const ACL_PUBLIC_CONTAINER = 'container'

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

const BLOBTYPE_BLOCK = 'BlockBlob'

Blob types.

const BLOBTYPE_PAGE = 'PageBlob'
const LEASE_ACQUIRE = 'acquire'

Blob lease constants.

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

Maximal blob size (in bytes)

const MAX_BLOB_TRANSFER_SIZE = 4194304

Maximal blob transfer size (in bytes)

const PAGE_WRITE_CLEAR = 'clear'
const PAGE_WRITE_UPDATE = 'update'

Put page write options.