PHP Class Horde_Dav_File, horde

Author: Jan Schneider ([email protected])
Inheritance: extends Sabre\DAV\File, implements Sabre\DAV\IProperties
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_item array File details.
$_path string The path to the current file.
$_propertyMap array Mapping of WebDAV property names to Horde API's browse() properties.
$_registry Horde_Registry A registry object.
$_size integer 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.

Public Methods

Method Description
__construct ( Horde_Registry $registry, string $path = null, array $item = [] ) Constructor.
delete ( ) 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 ( ) : integer Returns the last modification time, as a unix timestamp
getName ( ) : string Returns the name of the node.
getProperties ( array $properties ) : void Returns a list of properties for this nodes.
getSize ( ) : integer Returns the size of the file, in bytes.
propPatch ( Sabre\DAV\PropPatch $propPatch ) : void Updates properties on this node.
put ( resource $data ) : void Updates the data

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Registry $registry, string $path = null, array $item = [] )
$registry Horde_Registry A registry object.
$path string The path to this file.
$item array File details.

delete() public method

Deletes the current node.
public delete ( )

get() public method

This method may either return a string or a readable stream resource
public get ( ) : mixed
return mixed

getContentType() public method

If null is returned, we'll assume application/octet-stream
public getContentType ( ) : string | null
return string | null

getETag() public method

Returns the ETag for a file.
public getETag ( ) : string | null
return string | null

getLastModified() public method

Returns the last modification time, as a unix timestamp
public getLastModified ( ) : integer
return integer

getName() public method

This is used to generate the url.
public getName ( ) : string
return string

getProperties() public method

Returns a list of properties for this nodes.
public getProperties ( array $properties ) : void
$properties array
return void

getSize() public method

Returns the size of the file, in bytes.
public getSize ( ) : integer
return integer

propPatch() public method

Updates properties on this node.
public propPatch ( Sabre\DAV\PropPatch $propPatch ) : void
$propPatch Sabre\DAV\PropPatch
return void

put() public method

data is a readable stream resource.
public put ( resource $data ) : void
$data resource
return void

Property Details

$_item protected_oe property

File details.
protected array $_item
return array

$_path protected_oe property

The path to the current file.
protected string $_path
return string

$_propertyMap protected_oe static_oe property

Mapping of WebDAV property names to Horde API's browse() properties.
protected static array $_propertyMap
return array

$_registry protected_oe property

A registry object.
protected Horde_Registry $_registry
return Horde_Registry

$_size protected_oe property

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.
protected int $_size
return integer