Documentation

Horde_Dav_File extends File
in package
implements IProperties

A file object.

Tags
author

Jan Schneider jan@horde.org

category

Horde

copyright

2013-2017 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Interfaces, Classes, Traits and Enums

IProperties

Table of Contents

$_item  : array<string|int, mixed>
File details.
$_path  : string
The path to the current file.
$_propertyMap  : array<string|int, mixed>
Mapping of WebDAV property names to Horde API's browse() properties.
$_registry  : Horde_Registry
A registry object.
$_size  : int
File size.
__construct()  : mixed
Constructor.
delete()  : mixed
Deletes the current node.
get()  : mixed
Returns the data
getContentType()  : string|null
Returns the mime-type for a file
getETag()  : string|null
Returns the ETag for a file.
getLastModified()  : int
Returns the last modification time, as a unix timestamp
getName()  : string
Returns the name of the node.
getProperties()  : void
Returns a list of properties for this nodes.
getSize()  : int
Returns the size of the file, in bytes.
propPatch()  : void
Updates properties on this node.
put()  : void
Updates the data

Properties

$_item

File details.

protected array<string|int, mixed> $_item

$_path

The path to the current file.

protected string $_path

$_propertyMap

Mapping of WebDAV property names to Horde API's browse() properties.

protected static array<string|int, mixed> $_propertyMap = array('{DAV:}getcontentlength' => 'contentlength', '{DAV:}getcontenttype' => 'contentype', '{DAV:}getetag' => 'etag', '{DAV:}owner' => 'owner', '{http://sabredav.org/ns}read-only' => 'read-only')

$_registry

A registry object.

protected Horde_Registry $_registry

$_size

File size.

protected int $_size

This will only be set if the actual file data is requested, to avoid the overhead of building the file content only to retrieve the file size.

Methods

__construct()

Constructor.

public __construct(Horde_Registry $registry[, string $path = null ][, array<string|int, mixed> $item = array() ]) : mixed
Parameters
$registry : Horde_Registry

A registry object.

$path : string = null

The path to this file.

$item : array<string|int, mixed> = array()

File details.

Return values
mixed

delete()

Deletes the current node.

public delete() : mixed
Return values
mixed

get()

Returns the data

public get() : mixed

This method may either return a string or a readable stream resource

Return values
mixed

getContentType()

Returns the mime-type for a file

public getContentType() : string|null

If null is returned, we'll assume application/octet-stream

Return values
string|null

getETag()

Returns the ETag for a file.

public getETag() : string|null
Return values
string|null

getLastModified()

Returns the last modification time, as a unix timestamp

public getLastModified() : int
Return values
int

getName()

Returns the name of the node.

public getName() : string

This is used to generate the url.

Return values
string

getProperties()

Returns a list of properties for this nodes.

public getProperties(array<string|int, mixed> $properties) : void
Parameters
$properties : array<string|int, mixed>
Return values
void

getSize()

Returns the size of the file, in bytes.

public getSize() : int
Return values
int

propPatch()

Updates properties on this node.

public propPatch(PropPatch $propPatch) : void
Parameters
$propPatch : PropPatch
Return values
void

put()

Updates the data

public put(resource $data) : void

data is a readable stream resource.

Parameters
$data : resource
Return values
void

Search results