ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMountPointDAV.php
Go to the documentation of this file.
1 <?php
2 
8 
25 {
27  protected $access;
28 
30  protected $client_id;
31 
33  protected $user_id;
34 
36  protected $repo_helper;
37 
39  protected $dav_helper;
40 
42  {
43  global $DIC;
44 
45  $this->repo_helper = $repo_helper;
46  $this->dav_helper = $dav_helper;
47  $this->client_id = $DIC['ilias']->getClientId();
48  $this->username = $DIC->user()->getFullname();
49  $this->user_id = $DIC->user()->getId();
50  }
51 
57  public function getName()
58  {
59  return 'MountPoint';
60  }
61 
70  public function getChildren()
71  {
72  if ($this->user_id != null && $this->user_id != ANONYMOUS_USER_ID) {
73  return array(new ilClientNodeDAV($this->client_id, $this->repo_helper, $this->dav_helper));
74  } else {
75  throw new Forbidden('Only for logged in users');
76  }
77  }
78 
88  public function getChild($name)
89  {
90  if ($name == $this->client_id) {
91  return new ilClientNodeDAV($this->client_id, $this->repo_helper, $this->dav_helper);
92  }
93  throw new NotFound();
94  }
95 
102  public function childExists($name)
103  {
104  if ($name == $this->client_id) {
105  return true;
106  }
107  return false;
108  }
109 
115  public function getLastModified()
116  {
117  return strtotime('2000-01-01');
118  }
119 
126  public function createDirectory($name)
127  {
128  throw new Forbidden("It is not possible to create a directory here");
129  }
130 
139  public function createFile($name, $data = null)
140  {
141  throw new Forbidden("It is not possible to create a file here");
142  }
143 
150  public function setName($name)
151  {
152  throw new Forbidden("It is not possible to change the name of the root");
153  }
154 
160  public function delete()
161  {
162  throw new Forbidden("It is not possible to delete the root");
163  }
164 }
createFile($name, $data=null)
It is not allowed (not even possible) to create a file here.
Class ilMountPointDAV.
global $DIC
Definition: saml.php:7
getLastModified()
Return a default date as LastModified.
Class ilWebDAVRepositoryHelper.
getChildren()
Returns client node if user exists and is not anonymous.
createDirectory($name)
It is not allowed (not even possible) to create a directory here.
getName()
Return MountPoint as name.
Class ilWebDAVObjDAVHelper.
Class ilClientNodeDAV.
__construct(ilWebDAVRepositoryHelper $repo_helper, ilWebDAVObjDAVHelper $dav_helper)
childExists($name)
Check if given name matches the used Client ID.
getChild($name)
Returns Client Node if Client ID is correct.
setName($name)
It is not possible to set the name for the MountPoint.
$data
Definition: bench.php:6