WebDAVAdapterExt
extends WebDAVAdapter
in package
Table of Contents
- $fsConfig : mixed
- $client : Client
- $metadataFields : mixed
- $pathPrefix : string|null
- $pathSeparator : string
- $resultMap : array<string|int, mixed>
- $useStreamedCopy : bool
- __construct() : mixed
- Constructor.
- applyPathPrefix() : string
- Prefix a path.
- copy() : bool
- Copy a file.
- createDir() : mixed
- {@inheritdoc}
- delete() : mixed
- {@inheritdoc}
- deleteDir() : mixed
- {@inheritdoc}
- getMetadata() : mixed
- {@inheritdoc}
- getMimetype() : mixed
- {@inheritdoc}
- getPathPrefix() : string|null
- Get the path prefix.
- getSize() : mixed
- {@inheritdoc}
- getTimestamp() : mixed
- {@inheritdoc}
- getUrl() : mixed
- getUseStreamedCopy() : bool
- getVisibility() : mixed
- Get the visibility of a file.
- has() : mixed
- {@inheritdoc}
- listContents() : mixed
- {@inheritdoc}
- read() : array<string|int, mixed>|false
- Reads a file.
- readStream() : resource
- removePathPrefix() : string
- Remove a path prefix.
- rename() : mixed
- {@inheritdoc}
- setPathPrefix() : void
- Set the path prefix.
- setUseStreamedCopy() : mixed
- setVisibility() : mixed
- Set the visibility for a file.
- update() : mixed
- {@inheritdoc}
- updateStream() : mixed
- {@inheritdoc}
- write() : mixed
- {@inheritdoc}
- writeStream() : resource
- encodePath() : string
- url encode a path
- isDirectory() : bool
- nativeCopy() : bool
- Copy a file through WebDav COPY method.
- normalizeObject() : array<string|int, mixed>
- Normalise a WebDAV repsonse object.
Properties
$fsConfig
public
mixed
$fsConfig
$client
protected
Client
$client
$metadataFields
protected
static mixed
$metadataFields
= ['{DAV:}displayname', '{DAV:}getcontentlength', '{DAV:}getcontenttype', '{DAV:}getlastmodified', '{DAV:}iscollection', '{DAV:}resourcetype']
$pathPrefix
protected
string|null
$pathPrefix
path prefix
$pathSeparator
protected
string
$pathSeparator
= '/'
$resultMap
protected
static array<string|int, mixed>
$resultMap
= ['{DAV:}getcontentlength' => 'size', '{DAV:}getcontenttype' => 'mimetype', 'content-length' => 'size', 'content-type' => 'mimetype']
$useStreamedCopy
protected
bool
$useStreamedCopy
= true
Methods
__construct()
Constructor.
public
__construct(mixed $client, mixed $fsConfig) : mixed
Parameters
- $client : mixed
- $fsConfig : mixed
Return values
mixed —applyPathPrefix()
Prefix a path.
public
applyPathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —prefixed path
copy()
Copy a file.
public
copy(string $path, string $newpath) : bool
Parameters
- $path : string
- $newpath : string
Return values
bool —createDir()
{@inheritdoc}
public
createDir(mixed $path, Config $config) : mixed
Parameters
- $path : mixed
- $config : Config
Return values
mixed —delete()
{@inheritdoc}
public
delete(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —deleteDir()
{@inheritdoc}
public
deleteDir(mixed $dirname) : mixed
Parameters
- $dirname : mixed
Return values
mixed —getMetadata()
{@inheritdoc}
public
getMetadata(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —getMimetype()
{@inheritdoc}
public
getMimetype(mixed $path) : mixed
Parameters
- $path : mixed
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()
{@inheritdoc}
public
getSize(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —getTimestamp()
{@inheritdoc}
public
getTimestamp(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —getUrl()
public
getUrl(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —getUseStreamedCopy()
public
getUseStreamedCopy() : bool
Return values
bool —getVisibility()
Get the visibility of a file.
public
getVisibility(string $path) : mixed
Parameters
- $path : string
Tags
Return values
mixed —has()
{@inheritdoc}
public
has(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —listContents()
{@inheritdoc}
public
listContents([mixed $directory = '' ][, mixed $recursive = false ]) : mixed
Parameters
- $directory : mixed = ''
- $recursive : mixed = false
Return values
mixed —read()
Reads a file.
public
abstract read(string $path) : array<string|int, mixed>|false
Parameters
- $path : string
Tags
Return values
array<string|int, mixed>|false —readStream()
public
abstract readStream(string $path) : resource
Parameters
- $path : string
Return values
resource —removePathPrefix()
Remove a path prefix.
public
removePathPrefix(string $path) : string
Parameters
- $path : string
Return values
string —path without the prefix
rename()
{@inheritdoc}
public
rename(mixed $path, mixed $newpath) : mixed
Parameters
- $path : mixed
- $newpath : mixed
Return values
mixed —setPathPrefix()
Set the path prefix.
public
setPathPrefix(string $prefix) : void
Parameters
- $prefix : string
Return values
void —setUseStreamedCopy()
public
setUseStreamedCopy(bool $useStreamedCopy) : mixed
Parameters
- $useStreamedCopy : bool
Return values
mixed —setVisibility()
Set the visibility for a file.
public
setVisibility(string $path, string $visibility) : mixed
Parameters
- $path : string
- $visibility : string
Tags
Return values
mixed —update()
{@inheritdoc}
public
update(mixed $path, mixed $contents, Config $config) : mixed
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
Return values
mixed —updateStream()
{@inheritdoc}
public
updateStream(mixed $path, mixed $resource, Config $config) : mixed
Parameters
- $path : mixed
- $resource : mixed
- $config : Config
Return values
mixed —write()
{@inheritdoc}
public
write(mixed $path, mixed $contents, Config $config) : mixed
Parameters
- $path : mixed
- $contents : mixed
- $config : Config
Return values
mixed —writeStream()
public
abstract writeStream(string $path, resource $resource, Config $config) : resource
Parameters
- $path : string
- $resource : resource
- $config : Config
Return values
resource —encodePath()
url encode a path
protected
encodePath(string $path) : string
Parameters
- $path : string
Return values
string —isDirectory()
protected
isDirectory(array<string|int, mixed> $object) : bool
Parameters
- $object : array<string|int, mixed>
Return values
bool —nativeCopy()
Copy a file through WebDav COPY method.
protected
nativeCopy(string $path, string $newPath) : bool
Parameters
- $path : string
- $newPath : string
Return values
bool —normalizeObject()
Normalise a WebDAV repsonse object.
protected
normalizeObject(array<string|int, mixed> $object, string $path) : array<string|int, mixed>
Parameters
- $object : array<string|int, mixed>
- $path : string