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

DAV related classes from SabreDAV for Red Matrix. More...

Classes

class  RedDirectory
 RedDirectory class. More...
 
class  RedFile
 
class  RedBasicAuth
 Authentication backend class for RedDAV. 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

DAV related classes from SabreDAV for Red Matrix.

This file contains the classes from SabreDAV that got extended to adapt it for Red Matrix.

You find the original SabreDAV classes 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.

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?
Parameters
$auth
Returns
array containing RedDirectory objects

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.
Parameters
string$filepath to a directory
&$auth
Returns
array DAV[]

Referenced by RedDirectory\getChildren().

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

TODO What exactly is this function for?

Parameters
string$file
&$auth
boolean$test(optional) enable test mode

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