Documentation

VirtualDirectoryListWithMetaDataAdapter extends IndirectAdapter
in package

Read onlyYes
FinalYes

This adapter allows you to add virtual directories to a specific path on an underlying adapter.

The use case is a scenario where say you want to have a remote directory for each record in a local data store. Querying the list of remote directories can be significantly slower than the local data store; this adapter allows you to override the directory list without affecting other operations.

Table of Contents

Properties

$adapter  : FilesystemAdapter
$directories  : array<string|int, array<string|int, mixed>>
$path  : string

Methods

__construct()  : mixed
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()  : resource
setVisibility()  : void
visibility()  : FileAttributes
write()  : void
writeStream()  : void
getAdapter()  : FilesystemAdapter
preparePath()  : string

Properties

Methods

__construct()

public __construct(FilesystemAdapter $adapter, string $path, array<string|int, array<string|int, mixed>> $directories) : mixed
Parameters
$adapter : FilesystemAdapter
$path : string
$directories : array<string|int, array<string|int, mixed>>

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

deleteDirectory()

public deleteDirectory(string $path) : void
Parameters
$path : string

fileExists()

public fileExists(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
Return values
string

read()

public read(string $path) : string
Parameters
$path : string
Return values
string

readStream()

public readStream(string $path) : resource
Parameters
$path : string
Return values
resource

setVisibility()

public setVisibility(string $path, string $visibility) : void
Parameters
$path : string
$visibility : 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, resource $contents, Config $config) : void
Parameters
$path : string
$contents : resource
$config : Config

getAdapter()

protected getAdapter(string $rawPath, string $preparedPath) : FilesystemAdapter
Parameters
$rawPath : string
$preparedPath : string
Return values
FilesystemAdapter

preparePath()

protected preparePath(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results