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'];
 
An exception for terminatinating execution or to throw for unit testing.
setGroupMemberSet(array $groupMembers)
Sets a list of group members.
getGroupMembership()
Returns the list of groups this principal is member of.
getName()
Returns this principals name.
getOwner()
Returns the owner principal.
getDisplayName()
Returns the name of the user.
getPrincipalUrl()
Returns the full principal url.
getProperties($requestedProperties)
Returns a list of properties.
getAlternateUriSet()
Returns a list of alternative urls for a principal.
__construct(PrincipalBackend\BackendInterface $principalBackend, array $principalProperties=[])
Creates the principal object.
propPatch(DAV\PropPatch $propPatch)
Updates properties on this node.
getGroupMemberSet()
Returns the list of group members.
This class represents a set of properties that are going to be updated.
static splitPath($path)
Returns the 'dirname' and 'basename' for a path.