Microsoft_WindowsAzure
[ class tree: Microsoft_WindowsAzure ] [ index: Microsoft_WindowsAzure ] [ all elements ]

Class: Microsoft_WindowsAzure_Storage_Blob

Source Location: /WindowsAzure/Storage/Blob.php

Class Overview

Microsoft_WindowsAzure_Storage
   |
   --Microsoft_WindowsAzure_Storage_Blob



Author(s):

Copyright:

  • Copyright (c) 2009, RealDolmen (http://www.realdolmen.com)

Variables

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Microsoft_WindowsAzure_Storage

Microsoft_WindowsAzure_Storage::__construct()
Creates a new Microsoft_WindowsAzure_Storage instance
Microsoft_WindowsAzure_Storage::getAccountName()
Returns the Windows Azure account name
Microsoft_WindowsAzure_Storage::getBaseUrl()
Get base URL for creating requests
Microsoft_WindowsAzure_Storage::getCredentials()
Get Microsoft_WindowsAzure_Credentials instance
Microsoft_WindowsAzure_Storage::isoDate()
Generate ISO 8601 compliant date string in UTC time zone
Microsoft_WindowsAzure_Storage::parseResponse()
Parse result from Microsoft_Http_Response
Microsoft_WindowsAzure_Storage::performRequest()
Perform request using Microsoft_Http_Transport channel
Microsoft_WindowsAzure_Storage::setCredentials()
Set Microsoft_WindowsAzure_Credentials instance
Microsoft_WindowsAzure_Storage::setProxy()
Set proxy
Microsoft_WindowsAzure_Storage::setRetryPolicy()
Set retry policy to use when making requests
Microsoft_WindowsAzure_Storage::urlencode()
URL encode function

Class Details

[line 94]


Tags:

copyright:  Copyright (c) 2009, RealDolmen (http://www.realdolmen.com)
license:  http://phpazure.codeplex.com/license


[ Top ]


Class Variables

static $_wrapperClients = array()

[line 121]

Stream wrapper clients



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


static method createResourceName [line 1340]

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

Create resource name



Tags:

access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name

[ Top ]

static method getWrapperClient [line 1300]

static Microsoft_WindowsAzure_Storage_Blob getWrapperClient( string $name)

Get wrapper client for stream type



Tags:

access:  public


Parameters:

string   $name   Protocol name

[ Top ]

static method isValidContainerName [line 1358]

static boolean isValidContainerName( [string $containerName = ''])

Is valid container name?



Tags:

access:  public


Parameters:

string   $containerName   Container name

[ Top ]

constructor __construct [line 139]

Microsoft_WindowsAzure_Storage_Blob __construct( [string $host = Microsoft_WindowsAzure_Storage::URL_DEV_BLOB], [string $accountName = Microsoft_WindowsAzure_SharedKeyCredentials::DEVSTORE_ACCOUNT], [string $accountKey = Microsoft_WindowsAzure_SharedKeyCredentials::DEVSTORE_KEY], [boolean $usePathStyleUri = false], [Microsoft_WindowsAzure_RetryPolicy $retryPolicy = null])

Creates a new Microsoft_WindowsAzure_Storage_Blob instance



Tags:

access:  public


Overrides Microsoft_WindowsAzure_Storage::__construct() (Creates a new Microsoft_WindowsAzure_Storage instance)

Parameters:

string   $host   Storage host name
string   $accountName   Account name for Windows Azure
string   $accountKey   Account key for Windows Azure
boolean   $usePathStyleUri   Use path-style URI's
Microsoft_WindowsAzure_RetryPolicy   $retryPolicy   Retry policy to use when making requests

[ Top ]

method blobExists [line 157]

boolean blobExists( [string $containerName = ''], [string $blobName = ''])

Check if a blob exists



Tags:

access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name

[ Top ]

method containerExists [line 183]

boolean containerExists( [string $containerName = ''])

Check if a container exists



Tags:

access:  public


Parameters:

string   $containerName   Container name

[ Top ]

method copyBlob [line 863]

object Partial copyBlob( [string $sourceContainerName = ''], [string $sourceBlobName = ''], [string $destinationContainerName = ''], [string $destinationBlobName = ''], [array $metadata = array()], [array $additionalHeaders = array()])

Copy blob



Tags:

return:  blob properties
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $sourceContainerName   Source container name
string   $sourceBlobName   Source blob name
string   $destinationContainerName   Destination container name
string   $destinationBlobName   Destination blob name
array   $metadata   Key/value pairs of meta data
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd894037.aspx for more information.

[ Top ]

method createContainer [line 209]

object Container createContainer( [string $containerName = ''], [array $metadata = array()])

Create container



Tags:

return:  properties
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
array   $metadata   Key/value pairs of meta data

[ Top ]

method deleteBlob [line 1106]

void deleteBlob( [string $containerName = ''], [string $blobName = ''], [array $additionalHeaders = array()])

Delete blob



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method deleteContainer [line 463]

void deleteContainer( [string $containerName = ''], [array $additionalHeaders = array()])

Delete container



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method generateBlockId [line 1403]

string generateBlockId( [int $part = 0])

Generate block id



Tags:

return:  Windows Azure Blob Storage block number
access:  protected


Parameters:

int   $part   Block number

[ Top ]

method generateSharedAccessUrl [line 1248]

string generateSharedAccessUrl( [string $containerName = ''], [string $blobName = ''], [string $resource = 'b'], [string $permissions = 'r'], [string $start = ''], [string $expiry = ''], [string $identifier = ''])

Generate shared access URL



Tags:

access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
string   $resource   Signed resource - container (c) - blob (b)
string   $permissions   Signed permissions - read (r), write (w), delete (d) and list (l)
string   $start   The time at which the Shared Access Signature becomes valid.
string   $expiry   The time at which the Shared Access Signature becomes invalid.
string   $identifier   Signed identifier

[ Top ]

method getBlob [line 935]

void getBlob( [string $containerName = ''], [string $blobName = ''], [string $localFileName = ''], [array $additionalHeaders = array()])

Get blob



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
string   $localFileName   Local file name to store downloaded blob
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method getBlobInstance [line 975]

Microsoft_WindowsAzure_Storage_BlobInstance getBlobInstance( [string $containerName = ''], [string $blobName = ''], [array $additionalHeaders = array()])

Get container



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method getBlobMetadata [line 1039]

array getBlobMetadata( [string $containerName = ''], [string $blobName = ''])

Get blob metadata



Tags:

return:  Key/value pairs of meta data
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name

[ Top ]

method getBlockList [line 792]

array getBlockList( [string $containerName = ''], [string $blobName = ''], [integer $type = 0])

Get block list



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
integer   $type   Type of block list to retrieve. 0 = all, 1 = committed, 2 = uncommitted

[ Top ]

method getContainer [line 362]

Microsoft_WindowsAzure_Storage_BlobContainer getContainer( [string $containerName = ''])

Get container



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name

[ Top ]

method getContainerAcl [line 250]

bool getContainerAcl( [string $containerName = ''], [bool $signedIdentifiers = false])

Get container ACL



Tags:

return:  Acl, to be compared with Microsoft_WindowsAzure_Storage_Blob::ACL_*
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
bool   $signedIdentifiers   Display only public/private or display signed identifiers?

[ Top ]

method getContainerMetadata [line 404]

array getContainerMetadata( [string $containerName = ''])

Get container metadata



Tags:

return:  Key/value pairs of meta data
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name

[ Top ]

method getErrorMessage [line 1388]

string getErrorMessage( $response, [string $alternativeError = 'Unknown error.'])

Get error message from Microsoft_Http_Response



Tags:

access:  protected


Parameters:

Microsoft_Http_Response   $response   Repsonse
string   $alternativeError   Alternative error message

[ Top ]

method listBlobs [line 1147]

array listBlobs( [string $containerName = ''], [string $prefix = ''], [string $delimiter = ''], [int $maxResults = null], [string $marker = null], [int $currentResultCount = 0])

List blobs



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $prefix   Optional. Filters the results to return only blobs whose name begins with the specified prefix.
string   $delimiter   Optional. Delimiter, i.e. '/', for specifying folder hierarchy
int   $maxResults   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)
string   $marker   Optional string value that identifies the portion of the list to be returned with the next list operation.
int   $currentResultCount   Current result count (internal use)

[ Top ]

method listContainers [line 495]

array listContainers( [string $prefix = null], [int $maxResults = null], [string $marker = null], [int $currentResultCount = 0])

List containers



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $prefix   Optional. Filters the results to return only containers whose name begins with the specified prefix.
int   $maxResults   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)
string   $marker   Optional string value that identifies the portion of the list to be returned with the next list operation.
int   $currentResultCount   Current result count (internal use)

[ Top ]

method putBlob [line 555]

object Partial putBlob( [string $containerName = ''], [string $blobName = ''], [string $localFileName = ''], [array $metadata = array()], [array $additionalHeaders = array()])

Put blob



Tags:

return:  blob properties
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
string   $localFileName   Local file name to be uploaded
array   $metadata   Key/value pairs of meta data
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method putBlock [line 697]

void putBlock( [string $containerName = ''], [string $blobName = ''], [string $identifier = ''], [array $contents = ''])

Put large blob block



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
string   $identifier   Block ID
array   $contents   Contents of the block

[ Top ]

method putBlockList [line 731]

void putBlockList( [string $containerName = ''], [string $blobName = ''], [array $blockList = array()], [array $metadata = array()], [array $additionalHeaders = array()])

Put block list



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
array   $blockList   Array of block identifiers
array   $metadata   Key/value pairs of meta data
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method putLargeBlob [line 627]

object Partial putLargeBlob( [string $containerName = ''], [string $blobName = ''], [string $localFileName = ''], [array $metadata = array()])

Put large blob (> 64 MB)



Tags:

return:  blob properties
throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
string   $localFileName   Local file name to be uploaded
array   $metadata   Key/value pairs of meta data

[ Top ]

method registerAsClient [line 1276]

Microsoft_WindowsAzure_Storage_Blob registerAsClient( string $name)

Register this object as stream wrapper client



Tags:

access:  public


Parameters:

string   $name   Protocol name

[ Top ]

method registerStreamWrapper [line 1310]

void registerStreamWrapper( [string $name = 'azure'])

Register this object as stream wrapper



Tags:

access:  public


Parameters:

string   $name   Protocol name

[ Top ]

method setBlobMetadata [line 1064]

void setBlobMetadata( [string $containerName = ''], [string $blobName = ''], [array $metadata = array()], [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.




Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
string   $blobName   Blob name
array   $metadata   Key/value pairs of meta data
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method setContainerAcl [line 316]

void setContainerAcl( [string $containerName = ''], [bool $acl = self::ACL_PRIVATE], [array $signedIdentifiers = array()])

Set container ACL



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
bool   $acl   Microsoft_WindowsAzure_Storage_Blob::ACL_*
array   $signedIdentifiers   Signed identifiers

[ Top ]

method setContainerMetadata [line 424]

void setContainerMetadata( [string $containerName = ''], [array $metadata = array()], [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.




Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  public


Parameters:

string   $containerName   Container name
array   $metadata   Key/value pairs of meta data
array   $additionalHeaders   Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

[ Top ]

method unregisterAsClient [line 1288]

Microsoft_WindowsAzure_Storage_Blob unregisterAsClient( string $name)

Unregister this object as stream wrapper client



Tags:

access:  public


Parameters:

string   $name   Protocol name

[ Top ]

method unregisterStreamWrapper [line 1327]

Microsoft_WindowsAzure_Storage_Blob unregisterStreamWrapper( [string $name = 'azure'])

Unregister this object as stream wrapper



Tags:

access:  public


Parameters:

string   $name   Protocol name

[ Top ]


Class Constants

ACL_PRIVATE =  false

[line 99]

ACL - Private access


[ Top ]

ACL_PUBLIC =  true

[line 104]

ACL - Public access


[ Top ]

MAX_BLOB_SIZE =  67108864

[line 109]

Maximal blob size (in bytes)


[ Top ]

MAX_BLOB_TRANSFER_SIZE =  4194304

[line 114]

Maximal blob transfer size (in bytes)


[ Top ]



Documentation generated on Thu, 26 Nov 2009 08:04:46 +0100 by phpDocumentor 1.4.3