ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ProxyRead.php
Go to the documentation of this file.
1<?php
2
4
5use Sabre\DAV;
7
19class ProxyRead implements IProxyRead {
20
26 protected $principalInfo;
27
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-read';
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
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
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}
An exception for terminatinating execution or to throw for unit testing.
ProxyRead principal.
Definition: ProxyRead.php:19
getAlternateUriSet()
Returns a list of alternative urls for a principal.
Definition: ProxyRead.php:105
setName($name)
Renames the node.
Definition: ProxyRead.php:91
getDisplayName()
Returns the displayname.
Definition: ProxyRead.php:175
getGroupMemberSet()
Returns the list of group members.
Definition: ProxyRead.php:130
getLastModified()
Returns the last modification time.
Definition: ProxyRead.php:66
setGroupMemberSet(array $principals)
Sets a list of group members.
Definition: ProxyRead.php:161
getName()
Returns this principals name.
Definition: ProxyRead.php:55
getGroupMembership()
Returns the list of groups this principal is member of.
Definition: ProxyRead.php:144
__construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo)
Creates the object.
Definition: ProxyRead.php:43
getPrincipalUrl()
Returns the full principal url.
Definition: ProxyRead.php:116
ProxyRead principal interface.
Definition: IProxyRead.php:17
Implement this interface to create your own principal backends.