AzureBlobStorageAdapter
in package
implements
ChecksumProvider, FilesystemAdapter, PublicUrlGenerator, TemporaryUrlGenerator
FinalYes
Exposes an Azure Blob Storage container as a Flysystem filesystem adapter.
Table of Contents
Interfaces
- ChecksumProvider
- FilesystemAdapter
- PublicUrlGenerator
- TemporaryUrlGenerator
Constants
- ON_VISIBILITY_IGNORE : mixed = 'ignore'
- ON_VISIBILITY_THROW_ERROR : mixed = 'throw'
Properties
- $containerClient : BlobContainerClient
- $isPublicContainer : bool
- $mimeTypeDetector : MimeTypeDetector
- $prefixer : PathPrefixer
- $visibilityHandling : string
Methods
- __construct() : mixed
- checksum() : string
- copy() : void
- createDirectory() : void
- delete() : void
- deleteDirectory() : void
- directoryExists() : bool
- fileExists() : bool
- fileSize() : FileAttributes
- lastModified() : FileAttributes
- listContents() : iterable<string|int, mixed>
- mimeType() : FileAttributes
- move() : void
- publicUrl() : string
- read() : string
- readStream() : mixed
- setVisibility() : void
- temporaryUrl() : string
- visibility() : FileAttributes
- write() : void
- writeStream() : void
- buildUploadOptionsFromConfig() : UploadBlobOptions
- copyClientSide() : void
- copyServerToServerWithPublicUrl() : void
- copyServerToServerWithSas() : void
- fetchMetadata() : FileAttributes
- normalizeBlob() : FileAttributes
- upload() : void
Constants
ON_VISIBILITY_IGNORE
public
mixed
ON_VISIBILITY_IGNORE
= 'ignore'
ON_VISIBILITY_THROW_ERROR
public
mixed
ON_VISIBILITY_THROW_ERROR
= 'throw'
Properties
$containerClient read-only
private
BlobContainerClient
$containerClient
$isPublicContainer read-only
private
bool
$isPublicContainer
= false
$mimeTypeDetector read-only
private
MimeTypeDetector
$mimeTypeDetector
$prefixer read-only
private
PathPrefixer
$prefixer
$visibilityHandling read-only
private
string
$visibilityHandling
= self::ON_VISIBILITY_THROW_ERROR
Methods
__construct()
public
__construct(BlobContainerClient $containerClient[, string $prefix = '' ][, MimeTypeDetector|null $mimeTypeDetector = null ][, string $visibilityHandling = self::ON_VISIBILITY_THROW_ERROR ][, bool $isPublicContainer = false ]) : mixed
Parameters
- $containerClient : BlobContainerClient
- $prefix : string = ''
- $mimeTypeDetector : MimeTypeDetector|null = null
- $visibilityHandling : string = self::ON_VISIBILITY_THROW_ERROR
- $isPublicContainer : bool = false
checksum()
public
checksum(string $path, Config $config) : string
Parameters
- $path : string
- $config : Config
Return values
stringcopy()
public
copy(string $source, string $destination, Config $config) : void
Parameters
- $source : string
- $destination : string
- $config : Config
createDirectory()
public
createDirectory(string $path, Config $config) : void
Parameters
- $path : string
- $config : Config
delete()
public
delete(string $path) : void
Parameters
- $path : string
deleteDirectory()
public
deleteDirectory(string $path) : void
Parameters
- $path : string
directoryExists()
public
directoryExists(string $path) : bool
Parameters
- $path : string
Return values
boolfileExists()
public
fileExists(string $path) : bool
Parameters
- $path : string
Return values
boolfileSize()
public
fileSize(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeslastModified()
public
lastModified(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeslistContents()
public
listContents(string $path, bool $deep) : iterable<string|int, mixed>
Parameters
- $path : string
- $deep : bool
Return values
iterable<string|int, mixed>mimeType()
public
mimeType(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributesmove()
public
move(string $source, string $destination, Config $config) : void
Parameters
- $source : string
- $destination : string
- $config : Config
publicUrl()
public
publicUrl(string $path, Config $config) : string
Parameters
- $path : string
- $config : Config
Tags
Return values
stringread()
public
read(string $path) : string
Parameters
- $path : string
Return values
stringreadStream()
public
readStream(string $path) : mixed
Parameters
- $path : string
setVisibility()
public
setVisibility(string $path, string $visibility) : void
Parameters
- $path : string
- $visibility : string
temporaryUrl()
public
temporaryUrl(string $path, DateTimeInterface $expiresAt, Config $config) : string
Parameters
- $path : string
- $expiresAt : DateTimeInterface
- $config : Config
Return values
stringvisibility()
public
visibility(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributeswrite()
public
write(string $path, string $contents, Config $config) : void
Parameters
- $path : string
- $contents : string
- $config : Config
writeStream()
public
writeStream(string $path, mixed $contents, Config $config) : void
Parameters
- $path : string
- $contents : mixed
- $config : Config
buildUploadOptionsFromConfig()
private
buildUploadOptionsFromConfig(Config|null $config) : UploadBlobOptions
Parameters
- $config : Config|null
Return values
UploadBlobOptionscopyClientSide()
private
copyClientSide(BlobClient $sourceBlobClient, BlobClient $targetBlobClient) : void
Parameters
- $sourceBlobClient : BlobClient
- $targetBlobClient : BlobClient
copyServerToServerWithPublicUrl()
private
copyServerToServerWithPublicUrl(BlobClient $targetBlobClient, BlobClient $sourceBlobClient) : void
Parameters
- $targetBlobClient : BlobClient
- $sourceBlobClient : BlobClient
copyServerToServerWithSas()
private
copyServerToServerWithSas(BlobClient $targetBlobClient, BlobClient $sourceBlobClient) : void
Parameters
- $targetBlobClient : BlobClient
- $sourceBlobClient : BlobClient
fetchMetadata()
private
fetchMetadata(string $path) : FileAttributes
Parameters
- $path : string
Return values
FileAttributesnormalizeBlob()
private
normalizeBlob(string $name, BlobProperties $properties) : FileAttributes
Parameters
- $name : string
- $properties : BlobProperties
Return values
FileAttributesupload()
private
upload(string $path, string|resource $contents[, Config|null $config = null ]) : void
Parameters
- $path : string
- $contents : string|resource
- $config : Config|null = null