50 throw new DAV\Exception(
'The principal properties must at least contain the \'uri\' key');
64 return $this->principalProperties[
'uri'];
78 if (isset($this->principalProperties[
'{DAV:}alternate-URI-set'])) {
80 $uris = $this->principalProperties[
'{DAV:}alternate-URI-set'];
84 if (isset($this->principalProperties[
'{http://sabredav.org/ns}email-address'])) {
85 $uris[] =
'mailto:' . $this->principalProperties[
'{http://sabredav.org/ns}email-address'];
88 return array_unique($uris);
102 return $this->principalBackend->getGroupMemberSet($this->principalProperties[
'uri']);
116 return $this->principalBackend->getGroupMemberShip($this->principalProperties[
'uri']);
133 $this->principalBackend->setGroupMemberSet($this->principalProperties[
'uri'], $groupMembers);
144 $uri = $this->principalProperties[
'uri'];
157 if (isset($this->principalProperties[
'{DAV:}displayname'])) {
158 return $this->principalProperties[
'{DAV:}displayname'];
174 foreach ($requestedProperties as $propName) {
176 if (isset($this->principalProperties[$propName])) {
177 $newProperties[$propName] = $this->principalProperties[$propName];
182 return $newProperties;
200 return $this->principalBackend->updatePrincipal(
201 $this->principalProperties[
'uri'],
216 return $this->principalProperties[
'uri'];
This class represents a set of properties that are going to be updated.
getOwner()
Returns the owner principal.
getGroupMembership()
Returns the list of groups this principal is member of.
propPatch(DAV\PropPatch $propPatch)
Updates properties on this node.
setGroupMemberSet(array $groupMembers)
Sets a list of group members.
getProperties($requestedProperties)
Returns a list of properties.
__construct(PrincipalBackend\BackendInterface $principalBackend, array $principalProperties=[])
Creates the principal object.
getName()
Returns this principals name.
getPrincipalUrl()
Returns the full principal url.
getAlternateUriSet()
Returns a list of alternative urls for a principal.
getDisplayName()
Returns the name of the user.
getGroupMemberSet()
Returns the list of group members.
static splitPath($path)
Returns the 'dirname' and 'basename' for a path.