phpDocumentor

MountManager implements FileSystem

FinalYes

This class manages filesystem layers within phpDocumentor.

The purpose of this class is to be able to provide a read-only interface for template filesystems. So when ever files are fetched from data/templates or directly from the template directory we are able to get what we need. Flysystem v1 had support for this, but with the new abstraction we should not go there anymore. This class will do something equal.

Table of Contents

Interfaces

FileSystem

Properties

$defaultFileSystem  : string|null
$filesystems  : array<string|int, mixed>

Methods

__construct()  : mixed
find()  : iterable<string|int, mixed>
has()  : bool
isDirectory()  : bool
lastModified()  : int
listContents()  : array<string|int, mixed>
put()  : bool
putStream()  : void
read()  : string|false
readStream()  : mixed
fileSystem()  : FileSystem
getSchemaAndPath()  : array{scheme: string, path: string}

Properties

$defaultFileSystem

private string|null $defaultFileSystem = null

$filesystems

private array<string|int, mixed> $filesystems

Methods

__construct()

public __construct(array<string, FileSystem$filesystems[, string|null $defaultFileSystem = null ]) : mixed
Parameters
$filesystems : array<string, FileSystem>
$defaultFileSystem : string|null = null

find()

public find(SpecificationInterface $specification) : iterable<string|int, mixed>
Parameters
$specification : SpecificationInterface
Return values
iterable<string|int, mixed>

has()

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

isDirectory()

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

lastModified()

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

listContents()

public listContents([string $directory = '' ][, bool $recursive = false ]) : array<string|int, mixed>
Parameters
$directory : string = ''
$recursive : bool = false
Return values
array<string|int, mixed>

put()

public put(string $path, string $contents) : bool
Parameters
$path : string
$contents : string
Return values
bool

putStream()

public putStream(string $path, resource $resource) : void
Parameters
$path : string
$resource : resource

read()

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

readStream()

public readStream(string $path) : mixed
Parameters
$path : string

fileSystem()

private fileSystem(string $fileSystem) : FileSystem
Parameters
$fileSystem : string
Return values
FileSystem

getSchemaAndPath()

private getSchemaAndPath(string $path) : array{scheme: string, path: string}
Parameters
$path : string
Return values
array{scheme: string, path: string}

        
On this page

Search results