ILIAS  release_8 Revision v8.24
ilDAVMountPoint Class Reference

This class represents the absolut Root-Node on a WebDAV request. More...

+ Inheritance diagram for ilDAVMountPoint:
+ Collaboration diagram for ilDAVMountPoint:

Public Member Functions

 __construct (string $client_id, ilWebDAVObjFactory $web_dav_object_factory, ilWebDAVRepositoryHelper $repo_helper, ilObjUser $user)
 
 getName ()
 
 getChildren ()
 
 getChild ($name)
 
 childExists ($name)
 
 getLastModified ()
 

Protected Attributes

string $client_id
 
int $user_id
 
ilWebDAVObjFactory $web_dav_object_factory
 
ilWebDAVRepositoryHelper $repo_helper
 

Detailed Description

This class represents the absolut Root-Node on a WebDAV request.

If for example following URL is called: https://ilias.de/webdav.php/client/ref_1234/folder this class represents the very first '/' slash after "webdav.php".

This kind of procedure is needed for the way how sabreDAV works

Author
Raphael Heer rapha.nosp@m.el.h.nosp@m.eer@h.nosp@m.slu..nosp@m.ch

Definition at line 33 of file class.ilDAVMountPoint.php.

Constructor & Destructor Documentation

◆ __construct()

ilDAVMountPoint::__construct ( string  $client_id,
ilWebDAVObjFactory  $web_dav_object_factory,
ilWebDAVRepositoryHelper  $repo_helper,
ilObjUser  $user 
)

Definition at line 42 of file class.ilDAVMountPoint.php.

47 {
48 $this->client_id = $client_id;
49 $this->web_dav_object_factory = $web_dav_object_factory;
50 $this->repo_helper = $repo_helper;
51 $this->user_id = $user->getId();
52 }
ilWebDAVRepositoryHelper $repo_helper
ilWebDAVObjFactory $web_dav_object_factory

References $client_id, $repo_helper, $web_dav_object_factory, and ilObject\getId().

+ Here is the call graph for this function:

Member Function Documentation

◆ childExists()

ilDAVMountPoint::childExists (   $name)

Definition at line 75 of file class.ilDAVMountPoint.php.

75 : bool
76 {
77 if ($name === $this->client_id) {
78 return true;
79 }
80 return false;
81 }
if($format !==null) $name
Definition: metadata.php:247

References $name.

◆ getChild()

ilDAVMountPoint::getChild (   $name)

Definition at line 70 of file class.ilDAVMountPoint.php.

71 {
72 return $this->web_dav_object_factory->getClientNode($name);
73 }

References $name.

◆ getChildren()

ilDAVMountPoint::getChildren ( )
Returns
\Sabre\DAV\INode[]

Definition at line 62 of file class.ilDAVMountPoint.php.

62 : array
63 {
64 if ($this->user_id === ANONYMOUS_USER_ID) {
65 throw new Forbidden('Only for logged in users');
66 }
67 return array($this->web_dav_object_factory->getClientNode($this->client_id));
68 }
const ANONYMOUS_USER_ID
Definition: constants.php:27

References ANONYMOUS_USER_ID.

◆ getLastModified()

ilDAVMountPoint::getLastModified ( )

Definition at line 83 of file class.ilDAVMountPoint.php.

83 : int
84 {
85 return strtotime('2000-01-01');
86 }

◆ getName()

ilDAVMountPoint::getName ( )

Definition at line 54 of file class.ilDAVMountPoint.php.

54 : string
55 {
56 return 'MountPoint';
57 }

Field Documentation

◆ $client_id

string ilDAVMountPoint::$client_id
protected

Definition at line 37 of file class.ilDAVMountPoint.php.

Referenced by __construct().

◆ $repo_helper

ilWebDAVRepositoryHelper ilDAVMountPoint::$repo_helper
protected

Definition at line 40 of file class.ilDAVMountPoint.php.

Referenced by __construct().

◆ $user_id

int ilDAVMountPoint::$user_id
protected

Definition at line 38 of file class.ilDAVMountPoint.php.

◆ $web_dav_object_factory

ilWebDAVObjFactory ilDAVMountPoint::$web_dav_object_factory
protected

Definition at line 39 of file class.ilDAVMountPoint.php.

Referenced by __construct().


The documentation for this class was generated from the following file: