Moodle  2.2.1
http://www.collinsharper.com
Zend_Service_WindowsAzure_Storage_Blob Class Reference
Inheritance diagram for Zend_Service_WindowsAzure_Storage_Blob:
Collaboration diagram for Zend_Service_WindowsAzure_Storage_Blob:

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)
 blobExists ($containerName= '', $blobName= '')
 containerExists ($containerName= '')
 createContainer ($containerName= '', $metadata=array())
 getContainerAcl ($containerName= '', $signedIdentifiers=false)
 setContainerAcl ($containerName= '', $acl=self::ACL_PRIVATE, $signedIdentifiers=array())
 getContainer ($containerName= '')
 getContainerMetadata ($containerName= '')
 setContainerMetadata ($containerName= '', $metadata=array(), $additionalHeaders=array())
 deleteContainer ($containerName= '', $additionalHeaders=array())
 listContainers ($prefix=null, $maxResults=null, $marker=null, $currentResultCount=0)
 putBlob ($containerName= '', $blobName= '', $localFileName= '', $metadata=array(), $additionalHeaders=array())
 putLargeBlob ($containerName= '', $blobName= '', $localFileName= '', $metadata=array())
 putBlock ($containerName= '', $blobName= '', $identifier= '', $contents= '')
 putBlockList ($containerName= '', $blobName= '', $blockList=array(), $metadata=array(), $additionalHeaders=array())
 getBlockList ($containerName= '', $blobName= '', $type=0)
 copyBlob ($sourceContainerName= '', $sourceBlobName= '', $destinationContainerName= '', $destinationBlobName= '', $metadata=array(), $additionalHeaders=array())
 getBlob ($containerName= '', $blobName= '', $localFileName= '', $additionalHeaders=array())
 getBlobInstance ($containerName= '', $blobName= '', $additionalHeaders=array())
 getBlobMetadata ($containerName= '', $blobName= '')
 setBlobMetadata ($containerName= '', $blobName= '', $metadata=array(), $additionalHeaders=array())
 deleteBlob ($containerName= '', $blobName= '', $additionalHeaders=array())
 listBlobs ($containerName= '', $prefix= '', $delimiter= '', $maxResults=null, $marker=null, $currentResultCount=0)
 generateSharedAccessUrl ($containerName= '', $blobName= '', $resource= 'b', $permissions= 'r', $start= '', $expiry= '', $identifier= '')
 registerAsClient ($name)
 unregisterAsClient ($name)
 registerStreamWrapper ($name= 'azure')
 unregisterStreamWrapper ($name= 'azure')

Static Public Member Functions

static getWrapperClient ($name)
static createResourceName ($containerName= '', $blobName= '')
static isValidContainerName ($containerName= '')

Data Fields

const ACL_PRIVATE = false
const ACL_PUBLIC = true
const MAX_BLOB_SIZE = 67108864
const MAX_BLOB_TRANSFER_SIZE = 4194304

Protected Member Functions

 _getErrorMessage (Zend_Http_Response $response, $alternativeError= 'Unknown error.')
 _generateBlockId ($part=0)

Static Protected Attributes

static $_wrapperClients = array()

Detailed Description

Definition at line 81 of file Blob.php.


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

Reimplemented from Zend_Service_WindowsAzure_Storage.

Definition at line 126 of file Blob.php.


Member Function Documentation

_generateBlockId ( part = 0) [protected]

Generate block id

Parameters:
int$partBlock number
Returns:
string Windows Azure Blob Storage block number

Definition at line 1392 of file Blob.php.

Here is the caller graph for this function:

_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

Definition at line 1376 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

blobExists ( containerName = '',
blobName = '' 
)

Check if a blob exists

Parameters:
string$containerNameContainer name
string$blobNameBlob name
Returns:
boolean

Definition at line 144 of file Blob.php.

Here is the call graph for this function:

containerExists ( containerName = '')

Check if a container exists

Parameters:
string$containerNameContainer name
Returns:
boolean

Definition at line 173 of file Blob.php.

Here is the call graph for this function:

copyBlob ( sourceContainerName = '',
sourceBlobName = '',
destinationContainerName = '',
destinationBlobName = '',
metadata = array(),
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
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

Definition at line 841 of file Blob.php.

Here is the call graph for this function:

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

Definition at line 201 of file Blob.php.

Here is the call graph for this function:

static createResourceName ( containerName = '',
blobName = '' 
) [static]

Create resource name

Parameters:
string$containerNameContainer name
string$blobNameBlob name
Returns:
string

Definition at line 1320 of file Blob.php.

Here is the caller graph for this function:

deleteBlob ( containerName = '',
blobName = '',
additionalHeaders = array() 
)

Delete blob

Parameters:
string$containerNameContainer name
string$blobNameBlob name
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 1084 of file Blob.php.

Here is the call graph for this function:

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

Definition at line 436 of file Blob.php.

Here is the call graph for this function:

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

Definition at line 1226 of file Blob.php.

Here is the call graph for this function:

getBlob ( containerName = '',
blobName = '',
localFileName = '',
additionalHeaders = array() 
)

Get blob

Parameters:
string$containerNameContainer name
string$blobNameBlob name
string$localFileNameLocal file name to store downloaded blob
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 914 of file Blob.php.

Here is the call graph for this function:

getBlobInstance ( containerName = '',
blobName = '',
additionalHeaders = array() 
)

Get container

Parameters:
string$containerNameContainer name
string$blobNameBlob name
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

Definition at line 956 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getBlobMetadata ( containerName = '',
blobName = '' 
)

Get blob metadata

Parameters:
string$containerNameContainer name
string$blobNameBlob name
Returns:
array Key/value pairs of meta data
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 1013 of file Blob.php.

Here is the call graph for this function:

getBlockList ( containerName = '',
blobName = '',
type = 0 
)

Get block list

Parameters:
string$containerNameContainer name
string$blobNameBlob name
integer$typeType of block list to retrieve. 0 = all, 1 = committed, 2 = uncommitted
Returns:
array
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 771 of file Blob.php.

Here is the call graph for this function:

getContainer ( containerName = '')

Get container

Parameters:
string$containerNameContainer name
Returns:
Zend_Service_WindowsAzure_Storage_BlobContainer
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 342 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getContainerAcl ( containerName = '',
signedIdentifiers = false 
)

Get container ACL

Parameters:
string$containerNameContainer name
bool$signedIdentifiersDisplay only public/private or display signed identifiers?
Returns:
bool Acl, to be compared with Zend_Service_WindowsAzure_Storage_Blob::ACL_*
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 239 of file Blob.php.

Here is the call graph for this function:

getContainerMetadata ( containerName = '')

Get container metadata

Parameters:
string$containerNameContainer name
Returns:
array Key/value pairs of meta data
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 376 of file Blob.php.

Here is the call graph for this function:

static getWrapperClient ( name) [static]

Get wrapper client for stream type

Parameters:
string$nameProtocol name
Returns:
Zend_Service_WindowsAzure_Storage_Blob

Definition at line 1280 of file Blob.php.

Here is the caller graph for this function:

static isValidContainerName ( containerName = '') [static]

Is valid container name?

Parameters:
string$containerNameContainer name
Returns:
boolean

Definition at line 1340 of file Blob.php.

listBlobs ( containerName = '',
prefix = '',
delimiter = '',
maxResults = null,
marker = 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.
int$currentResultCountCurrent result count (internal use)
Returns:
array
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 1127 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

listContainers ( prefix = null,
maxResults = null,
marker = 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.
int$currentResultCountCurrent result count (internal use)
Returns:
array
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 468 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putBlob ( containerName = '',
blobName = '',
localFileName = '',
metadata = array(),
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
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

Definition at line 525 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putBlock ( containerName = '',
blobName = '',
identifier = '',
contents = '' 
)

Put large blob block

Parameters:
string$containerNameContainer name
string$blobNameBlob name
string$identifierBlock ID
array$contentsContents of the block
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 673 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putBlockList ( containerName = '',
blobName = '',
blockList = array(),
metadata = array(),
additionalHeaders = array() 
)

Put block list

Parameters:
string$containerNameContainer name
string$blobNameBlob name
array$blockListArray of block identifiers
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

Definition at line 711 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putLargeBlob ( containerName = '',
blobName = '',
localFileName = '',
metadata = 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
Returns:
object Partial blob properties
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 597 of file Blob.php.

Here is the call graph for this function:

Here is the caller graph for this function:

registerAsClient ( name)

Register this object as stream wrapper client

Parameters:
string$nameProtocol name
Returns:
Zend_Service_WindowsAzure_Storage_Blob

Definition at line 1256 of file Blob.php.

Here is the caller graph for this function:

registerStreamWrapper ( name = 'azure')

Register this object as stream wrapper

Parameters:
string$nameProtocol name
See also:
Zend_Service_WindowsAzure_Storage_Blob_Stream

Definition at line 1290 of file Blob.php.

Here is the call graph for this function:

setBlobMetadata ( containerName = '',
blobName = '',
metadata = array(),
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
array$additionalHeadersAdditional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
Exceptions:
Zend_Service_WindowsAzure_Exception

Definition at line 1042 of file Blob.php.

Here is the call graph for this function:

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

Definition at line 297 of file Blob.php.

Here is the call graph for this function:

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

Definition at line 398 of file Blob.php.

Here is the call graph for this function:

unregisterAsClient ( name)

Unregister this object as stream wrapper client

Parameters:
string$nameProtocol name
Returns:
Zend_Service_WindowsAzure_Storage_Blob

Definition at line 1268 of file Blob.php.

Here is the caller graph for this function:

unregisterStreamWrapper ( name = 'azure')

Unregister this object as stream wrapper

Parameters:
string$nameProtocol name
Returns:
Zend_Service_WindowsAzure_Storage_Blob

Definition at line 1307 of file Blob.php.

Here is the call graph for this function:


Field Documentation

$_wrapperClients = array() [static, protected]

Definition at line 108 of file Blob.php.

const ACL_PRIVATE = false

ACL - Private access

Definition at line 86 of file Blob.php.

const ACL_PUBLIC = true

ACL - Public access

Definition at line 91 of file Blob.php.

const MAX_BLOB_SIZE = 67108864

Maximal blob size (in bytes)

Definition at line 96 of file Blob.php.

const MAX_BLOB_TRANSFER_SIZE = 4194304

Maximal blob transfer size (in bytes)

Definition at line 101 of file Blob.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations