PHP Class Gaufrette\Adapter\AzureBlobStorage

Author: Luciano Mammino ([email protected])
Author: Paweł Czyżewski ([email protected])
Inheritance: implements Gaufrette\Adapter, implements Gaufrette\Adapter\MetadataSupporter
Exibir arquivo Open project: knplabs/gaufrette

Protected Properties

Property Type Description
$blobProxy MicrosoftAzure\Storage\Blob\Internal\IBlob
$blobProxyFactory Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface
$containerName string
$detectContentType boolean

Public Methods

Method Description
__construct ( Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface $blobProxyFactory, string $containerName, boolean $create = false, boolean $detectContentType = true )
createContainer ( string $containerName, MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options = null ) Creates a new container.
delete ( $key )
deleteContainer ( string $containerName, MicrosoftAzure\Storage\Blob\Models\DeleteContainerOptions $options = null ) Deletes a container.
exists ( $key )
getMetadata ( $key )
isDirectory ( $key )
keys ( )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
setMetadata ( $key, $content )
write ( $key, $content )

Protected Methods

Method Description
failIfContainerNotFound ( MicrosoftAzure\Storage\Common\ServiceException $exception, string $action ) Throws a runtime exception if a give ServiceException derived from a "container not found" error.
getErrorCodeFromServiceException ( MicrosoftAzure\Storage\Common\ServiceException $exception ) : string Extracts the error code from a service exception.
init ( ) Lazy initialization, automatically called when some method is called after construction.

Method Details

__construct() public method

public __construct ( Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface $blobProxyFactory, string $containerName, boolean $create = false, boolean $detectContentType = true )
$blobProxyFactory Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface
$containerName string
$create boolean
$detectContentType boolean

createContainer() public method

Creates a new container.
public createContainer ( string $containerName, MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options = null )
$containerName string
$options MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions

delete() public method

public delete ( $key )

deleteContainer() public method

Deletes a container.
public deleteContainer ( string $containerName, MicrosoftAzure\Storage\Blob\Models\DeleteContainerOptions $options = null )
$containerName string
$options MicrosoftAzure\Storage\Blob\Models\DeleteContainerOptions

exists() public method

public exists ( $key )

failIfContainerNotFound() protected method

Throws a runtime exception if a give ServiceException derived from a "container not found" error.
protected failIfContainerNotFound ( MicrosoftAzure\Storage\Common\ServiceException $exception, string $action )
$exception MicrosoftAzure\Storage\Common\ServiceException
$action string

getErrorCodeFromServiceException() protected method

Extracts the error code from a service exception.
protected getErrorCodeFromServiceException ( MicrosoftAzure\Storage\Common\ServiceException $exception ) : string
$exception MicrosoftAzure\Storage\Common\ServiceException
return string

getMetadata() public method

public getMetadata ( $key )

init() protected method

Lazy initialization, automatically called when some method is called after construction.
protected init ( )

isDirectory() public method

public isDirectory ( $key )

keys() public method

public keys ( )

mtime() public method

public mtime ( $key )

read() public method

public read ( $key )

rename() public method

public rename ( $sourceKey, $targetKey )

setMetadata() public method

public setMetadata ( $key, $content )

write() public method

public write ( $key, $content )

Property Details

$blobProxy protected_oe property

protected IBlob,MicrosoftAzure\Storage\Blob\Internal $blobProxy
return MicrosoftAzure\Storage\Blob\Internal\IBlob

$blobProxyFactory protected_oe property

protected BlobProxyFactoryInterface,Gaufrette\Adapter\AzureBlobStorage $blobProxyFactory
return Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface

$containerName protected_oe property

protected string $containerName
return string

$detectContentType protected_oe property

protected bool $detectContentType
return boolean