public function getBlobInstance($containerName = '', $blobName = '', $snapshotId = null, $leaseId = null, $additionalHeaders = array())
    {
        Assertion::notEmpty($containerName, 'Container name is not specified');
        self::assertValidContainerName($containerName);
        Assertion::notEmpty($blobName, 'Blob name is not specified.');
        self::assertValidRootContainerBlobName($containerName, $blobName);

        $query = array();
        if (!is_null($snapshotId)) {
            $query['snapshot'] = $snapshotId;
        }

        $headers = array();
        if (!is_null($leaseId)) {
            $headers['x-ms-lease-id'] = $leaseId;
        }
        foreach ($additionalHeaders as $key => $value) {
            $headers[$key] = $value;
        }

        $resourceName = self::createResourceName($containerName , $blobName);

        $response = $this->performRequest($resourceName, $query, 'HEAD', $headers, false, null, self::RESOURCE_BLOB, self::PERMISSION_READ);
        if ( ! $response->isSuccessful()) {
            throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
        }

        $metadata = $this->parseMetadataHeaders($response->getHeaders());

        return new BlobInstance(
            $containerName,
            $blobName,
            $snapshotId,
            $response->getHeader('Etag'),
            $response->getHeader('Last-modified'),
            $this->getBaseUrl() . '/' . $containerName . '/' . $blobName,
            $response->getHeader('Content-Length'),
            $response->getHeader('Content-Type'),
            $response->getHeader('Content-Encoding'),
            $response->getHeader('Content-Language'),
            $response->getHeader('Cache-Control'),
            $response->getHeader('x-ms-blob-type'),
            $response->getHeader('x-ms-lease-status'),
            false,
            $metadata
        );
    }
public function getBlobInstance($containerName = '', $blobName = '', $snapshotId = null, $leaseId = null, $additionalHeaders = array())
    {
        Assertion::notEmpty($containerName, 'Container name is not specified');
        self::assertValidContainerName($containerName);
        Assertion::notEmpty($blobName, 'Blob name is not specified.');
        self::assertValidRootContainerBlobName($containerName, $blobName);

        $query = array();
        if (!is_null($snapshotId)) {
            $query['snapshot'] = $snapshotId;
        }

        $headers = array();
        if (!is_null($leaseId)) {
            $headers['x-ms-lease-id'] = $leaseId;
        }
        foreach ($additionalHeaders as $key => $value) {
            $headers[$key] = $value;
        }

        $resourceName = self::createResourceName($containerName , $blobName);

        $response = $this->performRequest($resourceName, $query, 'HEAD', $headers, false, null, self::RESOURCE_BLOB, self::PERMISSION_READ);
        if ( ! $response->isSuccessful()) {
            throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
        }

        $metadata = $this->parseMetadataHeaders($response->getHeaders());

        return new BlobInstance(
            $containerName,
            $blobName,
            $snapshotId,
            $response->getHeader('Etag'),
            $response->getHeader('Last-modified'),
            $this->getBaseUrl() . '/' . $containerName . '/' . $blobName,
            $response->getHeader('Content-Length'),
            $response->getHeader('Content-Type'),
            $response->getHeader('Content-Encoding'),
            $response->getHeader('Content-Language'),
            $response->getHeader('Cache-Control'),
            $response->getHeader('x-ms-blob-type'),
            $response->getHeader('x-ms-lease-status'),
            false,
            $metadata
        );
    }
public function getBlobInstance ( $ containerName = '' , $ blobName = '' , $ snapshotId = null , $ leaseId = null , $ additionalHeaders = array ( ) ) { Assertion :: notEmpty ( $ containerName , 'Container name is not specified' ) ; self :: assertValidContainerName ( $ containerName ) ; Assertion :: notEmpty ( $ blobName , 'Blob name is not specified.' ) ; self :: assertValidRootContainerBlobName ( $ containerName , $ blobName ) ; $ query = array ( ) ; if ( ! is_null ( $ snapshotId ) ) { $ query [ 'snapshot' ] = $ snapshotId ; } $ headers = array ( ) ; if ( ! is_null ( $ leaseId ) ) { $ headers [ 'x-ms-lease-id' ] = $ leaseId ; } foreach ( $ additionalHeaders as $ key => $ value ) { $ headers [ $ key ] = $ value ; } $ resourceName = self :: createResourceName ( $ containerName , $ blobName ) ; $ response = $ this -> performRequest ( $ resourceName , $ query , 'HEAD' , $ headers , false , null , self :: RESOURCE_BLOB , self :: PERMISSION_READ ) ; if ( ! $ response -> isSuccessful ( ) ) { throw new BlobException ( $ this -> getErrorMessage ( $ response , 'Resource could not be accessed.' ) ) ; } $ metadata = $ this -> parseMetadataHeaders ( $ response -> getHeaders ( ) ) ; return new BlobInstance ( $ containerName , $ blobName , $ snapshotId , $ response -> getHeader ( 'Etag' ) , $ response -> getHeader ( 'Last-modified' ) , $ this -> getBaseUrl ( ) . '/' . $ containerName . '/' . $ blobName , $ response -> getHeader ( 'Content-Length' ) , $ response -> getHeader ( 'Content-Type' ) , $ response -> getHeader ( 'Content-Encoding' ) , $ response -> getHeader ( 'Content-Language' ) , $ response -> getHeader ( 'Cache-Control' ) , $ response -> getHeader ( 'x-ms-blob-type' ) , $ response -> getHeader ( 'x-ms-lease-status' ) , false , $ metadata ) ; }
Get blob instance

@param string $containerName      Container name
@param string $blobName           Blob name
@param string $snapshotId         Snapshot identifier
@param string $leaseId            Lease identifier
@param array  $additionalHeaders  Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
@return BlobInstance
@throws BlobException
Get blob instance