ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (protected string $client_id, protected ilWebDAVObjFactory $web_dav_object_factory, protected ilWebDAVRepositoryHelper $repo_helper, ilObjUser $user)
 
 getName ()
 
 getChildren ()
 
 getChild ($name)
 
 childExists ($name)
 
 getLastModified ()
 

Protected Attributes

int $user_id
 

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 34 of file class.ilDAVMountPoint.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

45 {
46 $this->user_id = $user->getId();
47 }

References ilObject\getId().

+ Here is the call graph for this function:

Member Function Documentation

◆ childExists()

ilDAVMountPoint::childExists (   $name)

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

70 : bool
71 {
72 return $name === $this->client_id;
73 }
$client_id
Definition: ltiauth.php:67

References $client_id.

◆ getChild()

ilDAVMountPoint::getChild (   $name)

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

66 {
67 return $this->web_dav_object_factory->getClientNode($name);
68 }

◆ getChildren()

ilDAVMountPoint::getChildren ( )
Returns
INode[]

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

57 : array
58 {
59 if ($this->user_id === ANONYMOUS_USER_ID) {
60 throw new Forbidden('Only for logged in users');
61 }
62 return [$this->web_dav_object_factory->getClientNode($this->client_id)];
63 }
const ANONYMOUS_USER_ID
Definition: constants.php:27

References ANONYMOUS_USER_ID.

◆ getLastModified()

ilDAVMountPoint::getLastModified ( )

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

75 : int
76 {
77 return strtotime('2000-01-01');
78 }

◆ getName()

ilDAVMountPoint::getName ( )

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

49 : string
50 {
51 return 'MountPoint';
52 }

Field Documentation

◆ $user_id

int ilDAVMountPoint::$user_id
protected

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


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