Local
extends AbstractAdapter
in package
Table of Contents
- DISALLOW_LINKS = 02
- SKIP_LINKS = 01
- $pathPrefix : string|null
- $pathSeparator : string
- $permissionMap : array<string|int, mixed>
- $permissions : array<string|int, mixed>
- $writeFlags : int
- $linkHandling : int
- __construct() : mixed
- Constructor.
- applyPathPrefix() : string
- Prefix a path.
- copy() : mixed
- createDir() : mixed
- delete() : mixed
- deleteDir() : mixed
- getMetadata() : mixed
- getMimetype() : mixed
- getPathPrefix() : string|null
- Get the path prefix.
- getSize() : mixed
- getTimestamp() : mixed
- getVisibility() : mixed
- has() : mixed
- listContents() : mixed
- read() : mixed
- readStream() : mixed
- removePathPrefix() : string
- Remove a path prefix.
- rename() : mixed
- setPathPrefix() : void
- Set the path prefix.
- setVisibility() : mixed
- update() : mixed
- updateStream() : mixed
- write() : mixed
- writeStream() : mixed
- deleteFileInfoObject() : mixed
- ensureDirectory() : void
- Ensure the root directory exists.
- getDirectoryIterator() : DirectoryIterator
- getFilePath() : string
- Get the normalized path from a SplFileInfo object.
- getRecursiveDirectoryIterator() : RecursiveIteratorIterator
- guardAgainstUnreadableFileInfo() : mixed
- mapFileInfo() : array<string|int, mixed>
- normalizeFileInfo() : array<string|int, mixed>|void
- Normalize the file info.
Constants
DISALLOW_LINKS
public
int
DISALLOW_LINKS
= 02
SKIP_LINKS
public
int
SKIP_LINKS
= 01
Properties
$pathPrefix
protected
string|null
$pathPrefix
path prefix
$pathSeparator
protected
string
$pathSeparator
= DIRECTORY_SEPARATOR
$permissionMap
protected
array<string|int, mixed>
$permissionMap
$permissions
protected
static array<string|int, mixed>
$permissions
= ['file' => ['public' => 0644, 'private' => 0600], 'dir' => ['public' => 0755, 'private' => 0700]]
$writeFlags
protected
int
$writeFlags
$linkHandling
private
int
$linkHandling
Methods
__construct()
Constructor.
public
__construct(string $root[, int $writeFlags = LOCK_EX ][, int $linkHandling = self::DISALLOW_LINKS ][, array<string|int, mixed> $permissions = [] ]) : mixed
Parameters
- $root : string
- $writeFlags : int = LOCK_EX
- $linkHandling : int = self::DISALLOW_LINKS
- $permissions : array<string|int, mixed> = []
Tags
Return values
mixed —applyPathPrefix()
Prefix a path.
public
applyPathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —prefixed path
copy()
public
copy(mixed $path, mixed $newpath) : mixed
Parameters
- $path : mixed
- $newpath : mixed
Tags
Return values
mixed —createDir()
public
createDir(mixed $dirname, Config $config) : mixed
Parameters
- $dirname : mixed
- $config : Config
Tags
Return values
mixed —delete()
public
delete(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —deleteDir()
public
deleteDir(mixed $dirname) : mixed
Parameters
- $dirname : mixed
Tags
Return values
mixed —getMetadata()
public
getMetadata(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —getMimetype()
public
getMimetype(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —getPathPrefix()
Get the path prefix.
public
getPathPrefix() : string|null
Return values
string|null —path prefix or null if pathPrefix is empty
getSize()
public
getSize(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —getTimestamp()
public
getTimestamp(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —getVisibility()
public
getVisibility(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —has()
public
has(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —listContents()
public
listContents([mixed $directory = '' ][, mixed $recursive = false ]) : mixed
Parameters
- $directory : mixed = ''
- $recursive : mixed = false
Tags
Return values
mixed —read()
public
read(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —readStream()
public
readStream(mixed $path) : mixed
Parameters
- $path : mixed
Tags
Return values
mixed —removePathPrefix()
Remove a path prefix.
public
removePathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —path without the prefix
rename()
public
rename(mixed $path, mixed $newpath) : mixed
Parameters
- $path : mixed
- $newpath : mixed
Tags
Return values
mixed —setPathPrefix()
Set the path prefix.
public
setPathPrefix(string $prefix) : void
Parameters
- $prefix : string
Return values
void —setVisibility()
public
setVisibility(mixed $path, mixed $visibility) : mixed
Parameters
- $path : mixed
- $visibility : mixed
Tags
Return values
mixed —update()
public
update(mixed $path, mixed $contents, Config $config) : mixed
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
Tags
Return values
mixed —updateStream()
public
updateStream(mixed $path, mixed $resource, Config $config) : mixed
Parameters
- $path : mixed
- $resource : mixed
- $config : Config
Tags
Return values
mixed —write()
public
write(mixed $path, mixed $contents, Config $config) : mixed
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
Tags
Return values
mixed —writeStream()
public
writeStream(mixed $path, mixed $resource, Config $config) : mixed
Parameters
- $path : mixed
- $resource : mixed
- $config : Config
Tags
Return values
mixed —deleteFileInfoObject()
protected
deleteFileInfoObject(SplFileInfo $file) : mixed
Parameters
- $file : SplFileInfo
Return values
mixed —ensureDirectory()
Ensure the root directory exists.
protected
ensureDirectory(string $root) : void
Parameters
- $root : string
-
root directory path
Tags
Return values
void —getDirectoryIterator()
protected
getDirectoryIterator(string $path) : DirectoryIterator
Parameters
- $path : string
Return values
DirectoryIterator —getFilePath()
Get the normalized path from a SplFileInfo object.
protected
getFilePath(SplFileInfo $file) : string
Parameters
- $file : SplFileInfo
Return values
string —getRecursiveDirectoryIterator()
protected
getRecursiveDirectoryIterator(string $path[, int $mode = RecursiveIteratorIterator::SELF_FIRST ]) : RecursiveIteratorIterator
Parameters
- $path : string
- $mode : int = RecursiveIteratorIterator::SELF_FIRST
Return values
RecursiveIteratorIterator —guardAgainstUnreadableFileInfo()
protected
guardAgainstUnreadableFileInfo(SplFileInfo $file) : mixed
Parameters
- $file : SplFileInfo
Tags
Return values
mixed —mapFileInfo()
protected
mapFileInfo(SplFileInfo $file) : array<string|int, mixed>
Parameters
- $file : SplFileInfo
Return values
array<string|int, mixed> —normalizeFileInfo()
Normalize the file info.
protected
normalizeFileInfo(SplFileInfo $file) : array<string|int, mixed>|void
Parameters
- $file : SplFileInfo