ILIAS  release_8 Revision v8.23
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.

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

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  }
ilWebDAVObjFactory $web_dav_object_factory
ilWebDAVRepositoryHelper $repo_helper
+ Here is the call graph for this function:

Member Function Documentation

◆ childExists()

ilDAVMountPoint::childExists (   $name)

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

References $name.

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

◆ getChild()

ilDAVMountPoint::getChild (   $name)

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

References $name.

71  {
72  return $this->web_dav_object_factory->getClientNode($name);
73  }
if($format !==null) $name
Definition: metadata.php:247

◆ getChildren()

ilDAVMountPoint::getChildren ( )
Returns
[]

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

References ANONYMOUS_USER_ID.

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

◆ 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: