Documentation

WebDAVAdapter extends AbstractAdapter
in package
Uses StreamedReadingTrait, StreamedCopyTrait, NotSupportingVisibilityTrait

Table of Contents

$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()  : mixed
{@inheritdoc}
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}
getUseStreamedCopy()  : bool
getVisibility()  : mixed
Get the visibility of a file.
has()  : mixed
{@inheritdoc}
listContents()  : mixed
{@inheritdoc}
read()  : mixed
{@inheritdoc}
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()  : mixed
{@inheritdoc}
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

$metadataFields

protected static mixed $metadataFields = ['{DAV:}displayname', '{DAV:}getcontentlength', '{DAV:}getcontenttype', '{DAV:}getlastmodified', '{DAV:}iscollection', '{DAV:}resourcetype']

$resultMap

protected static array<string|int, mixed> $resultMap = ['{DAV:}getcontentlength' => 'size', '{DAV:}getcontenttype' => 'mimetype', 'content-length' => 'size', 'content-type' => 'mimetype']

Methods

__construct()

Constructor.

public __construct(Client $client[, string $prefix = null ][, bool $useStreamedCopy = true ]) : mixed
Parameters
$client : Client
$prefix : string = null
$useStreamedCopy : bool = true
Return values
mixed

applyPathPrefix()

Prefix a path.

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

prefixed path

copy()

{@inheritdoc}

public copy(mixed $path, mixed $newpath) : mixed
Parameters
$path : mixed
$newpath : mixed
Return values
mixed

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

getUseStreamedCopy()

public getUseStreamedCopy() : bool
Return values
bool

getVisibility()

Get the visibility of a file.

public getVisibility(string $path) : mixed
Parameters
$path : string
Tags
throws
LogicException
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()

{@inheritdoc}

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

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
throws
LogicException
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()

{@inheritdoc}

public writeStream(mixed $path, mixed $resource, Config $config) : mixed
Parameters
$path : mixed
$resource : mixed
$config : Config
Return values
mixed

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
Return values
array<string|int, mixed>

Search results