The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
reddav.php File Reference

some DAV related functions for RedMatrix. More...

Functions

 RedChannelList (&$auth)
 Returns an array with viewable channels. More...
 
 RedCollectionData ($file, &$auth)
 TODO what exactly does this function? More...
 
 RedFileData ($file, &$auth, $test=false)
 TODO What exactly is this function for? More...
 

Detailed Description

some DAV related functions for RedMatrix.

This file contains some functions which did not fit into one of the RedDAV classes.

The extended SabreDAV classes you will find in the RedDAV namespace under includes/RedDAV/. The original SabreDAV classes you can find under vendor/sabre/dav/. We need to use SabreDAV 1.8.x for PHP5.3 compatibility. SabreDAV >= 2.0 requires PHP >= 5.4.

Todo:
split up the classes into own files.

http://opensource.org/licenses/mit-license.php The MIT License (MIT)

Function Documentation

RedChannelList ( $auth)

Returns an array with viewable channels.

Get a list of RedDirectory objects with all the channels where the visitor has view_storage perms.

Todo:
Is there any reason why this is not inside RedDirectory class? function name looks like a class name, should we rename it?
Parameters
RedBasicAuth&$auth
Returns
array RedDirectory[]

Referenced by RedCollectionData().

RedCollectionData (   $file,
$auth 
)

TODO what exactly does this function?

Array with all RedDirectory and RedFile DAV items for the given path.

Todo:
Is there any reason why this is not inside RedDirectory class? Seems only to be used there and we could simplify it a bit there. function name looks like a class name, should we rename it?
Parameters
string$filepath to a directory
RedBasicAuth&$auth
Returns
null|array []
Exceptions
\Sabre\DAV\Exception\Forbidden
\Sabre\DAV\Exception\NotFound

Referenced by RedMatrix\RedDAV\RedDirectory\getChildren().

RedFileData (   $file,
$auth,
  $test = false 
)

TODO What exactly is this function for?

function name looks like a class name, should we rename it?

Parameters
string$filepath to file or directory
RedBasicAuth&$auth
boolean$test(optional) enable test mode
Returns
RedFile|RedDirectory|boolean|null
Exceptions
\Sabre\DAV\Exception\Forbidden

Referenced by RedMatrix\RedDAV\RedDirectory\childExists(), cloud_init(), dav_init(), and RedMatrix\RedDAV\RedDirectory\getChild().