ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ProxyWrite.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CalDAV\Principal;
4 
5 use Sabre\DAV;
6 use Sabre\DAVACL;
7 
19 class ProxyWrite implements IProxyWrite {
20 
26  protected $principalInfo;
27 
33  protected $principalBackend;
34 
43  function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo) {
44 
45  $this->principalInfo = $principalInfo;
46  $this->principalBackend = $principalBackend;
47 
48  }
49 
55  function getName() {
56 
57  return 'calendar-proxy-write';
58 
59  }
60 
66  function getLastModified() {
67 
68  return null;
69 
70  }
71 
78  function delete() {
79 
80  throw new DAV\Exception\Forbidden('Permission denied to delete node');
81 
82  }
83 
91  function setName($name) {
92 
93  throw new DAV\Exception\Forbidden('Permission denied to rename file');
94 
95  }
96 
97 
105  function getAlternateUriSet() {
106 
107  return [];
108 
109  }
110 
116  function getPrincipalUrl() {
117 
118  return $this->principalInfo['uri'] . '/' . $this->getName();
119 
120  }
121 
130  function getGroupMemberSet() {
131 
132  return $this->principalBackend->getGroupMemberSet($this->getPrincipalUrl());
133 
134  }
135 
144  function getGroupMembership() {
145 
146  return $this->principalBackend->getGroupMembership($this->getPrincipalUrl());
147 
148  }
149 
161  function setGroupMemberSet(array $principals) {
162 
163  $this->principalBackend->setGroupMemberSet($this->getPrincipalUrl(), $principals);
164 
165  }
166 
175  function getDisplayName() {
176 
177  return $this->getName();
178 
179  }
180 
181 }
getAlternateUriSet()
Returns a list of alternative urls for a principal.
Definition: ProxyWrite.php:105
getName()
Returns this principals name.
Definition: ProxyWrite.php:55
__construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo)
Creates the object.
Definition: ProxyWrite.php:43
getGroupMemberSet()
Returns the list of group members.
Definition: ProxyWrite.php:130
getGroupMembership()
Returns the list of groups this principal is member of.
Definition: ProxyWrite.php:144
getPrincipalUrl()
Returns the full principal url.
Definition: ProxyWrite.php:116
ProxyWrite principal.
Definition: ProxyWrite.php:19
getLastModified()
Returns the last modification time.
Definition: ProxyWrite.php:66
setGroupMemberSet(array $principals)
Sets a list of group members.
Definition: ProxyWrite.php:161
ProxyWrite principal interface.
Definition: IProxyWrite.php:17
setName($name)
Renames the node.
Definition: ProxyWrite.php:91
getDisplayName()
Returns the displayname.
Definition: ProxyWrite.php:175
Implement this interface to create your own principal backends.