Azure OSS for PHP API Reference

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

Properties

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
string

copy()

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

directoryExists()

public directoryExists(string $path) : bool
Parameters
$path : string
Return values
bool

fileSize()

public fileSize(string $path) : FileAttributes
Parameters
$path : string
Return values
FileAttributes

lastModified()

public lastModified(string $path) : FileAttributes
Parameters
$path : string
Return values
FileAttributes

listContents()

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
FileAttributes

move()

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
description

If isPublicContainer is true, returns the direct public URL. Otherwise, Azure doesn't support permanent URLs, so we create one that lasts 1000 years.

Return values
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
string

visibility()

public visibility(string $path) : FileAttributes
Parameters
$path : string
Return values
FileAttributes

write()

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

fetchMetadata()

private fetchMetadata(string $path) : FileAttributes
Parameters
$path : string
Return values
FileAttributes

upload()

private upload(string $path, string|resource $contents[, Config|null $config = null ]) : void
Parameters
$path : string
$contents : string|resource
$config : Config|null = null
On this page

Search results