ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Principal\ProxyWrite Class Reference

ProxyWrite principal. More...

+ Inheritance diagram for Sabre\CalDAV\Principal\ProxyWrite:
+ Collaboration diagram for Sabre\CalDAV\Principal\ProxyWrite:

Public Member Functions

 __construct (DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo)
 Creates the object. More...
 
 getName ()
 Returns this principals name. More...
 
 getLastModified ()
 Returns the last modification time. More...
 
 delete ()
 Deletes the current node. More...
 
 setName ($name)
 Renames the node. More...
 
 getAlternateUriSet ()
 Returns a list of alternative urls for a principal. More...
 
 getPrincipalUrl ()
 Returns the full principal url. More...
 
 getGroupMemberSet ()
 Returns the list of group members. More...
 
 getGroupMembership ()
 Returns the list of groups this principal is member of. More...
 
 setGroupMemberSet (array $principals)
 Sets a list of group members. More...
 
 getDisplayName ()
 Returns the displayname. More...
 
 getAlternateUriSet ()
 Returns a list of alternative urls for a principal. More...
 
 getPrincipalUrl ()
 Returns the full principal url. More...
 
 getGroupMemberSet ()
 Returns the list of group members. More...
 
 getGroupMembership ()
 Returns the list of groups this principal is member of. More...
 
 setGroupMemberSet (array $principals)
 Sets a list of group members. More...
 
 getDisplayName ()
 Returns the displayname. More...
 
 delete ()
 Deleted the current node. More...
 
 getName ()
 Returns the name of the node. More...
 
 setName ($name)
 Renames the node. More...
 
 getLastModified ()
 Returns the last modification time, as a unix timestamp. More...
 

Protected Attributes

 $principalInfo
 
 $principalBackend
 

Detailed Description

ProxyWrite principal.

This class represents a principal group, hosted under the main principal. This is needed to implement 'Calendar delegation' support. This class is instantiated by User.

Author
Evert Pot (http://evertpot.com/) @license http://sabre.io/license/ Modified BSD License

Definition at line 19 of file ProxyWrite.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\CalDAV\Principal\ProxyWrite::__construct ( DAVACL\PrincipalBackend\BackendInterface  $principalBackend,
array  $principalInfo 
)

Creates the object.

Note that you MUST supply the parent principal information.

Parameters
DAVACL\PrincipalBackend\BackendInterface$principalBackend
array$principalInfo

Definition at line 43 of file ProxyWrite.php.

43 {
44
45 $this->principalInfo = $principalInfo;
46 $this->principalBackend = $principalBackend;
47
48 }

References Sabre\CalDAV\Principal\ProxyWrite\$principalBackend, and Sabre\CalDAV\Principal\ProxyWrite\$principalInfo.

Member Function Documentation

◆ delete()

Sabre\CalDAV\Principal\ProxyWrite::delete ( )

Deletes the current node.

Exceptions
DAV

Exception\Forbidden

Returns
void

Implements Sabre\DAV\INode.

Definition at line 78 of file ProxyWrite.php.

78 {
79
80 throw new DAV\Exception\Forbidden('Permission denied to delete node');
81
82 }

◆ getAlternateUriSet()

Sabre\CalDAV\Principal\ProxyWrite::getAlternateUriSet ( )

Returns a list of alternative urls for a principal.

This can for example be an email address, or ldap url.

Returns
array

Implements Sabre\DAVACL\IPrincipal.

Definition at line 105 of file ProxyWrite.php.

105 {
106
107 return [];
108
109 }

◆ getDisplayName()

Sabre\CalDAV\Principal\ProxyWrite::getDisplayName ( )

Returns the displayname.

This should be a human readable name for the principal. If none is available, return the nodename.

Returns
string

Implements Sabre\DAVACL\IPrincipal.

Definition at line 175 of file ProxyWrite.php.

175 {
176
177 return $this->getName();
178
179 }
getName()
Returns this principals name.
Definition: ProxyWrite.php:55

References Sabre\CalDAV\Principal\ProxyWrite\getName().

+ Here is the call graph for this function:

◆ getGroupMemberSet()

Sabre\CalDAV\Principal\ProxyWrite::getGroupMemberSet ( )

Returns the list of group members.

If this principal is a group, this function should return all member principal uri's for the group.

Returns
array

Implements Sabre\DAVACL\IPrincipal.

Definition at line 130 of file ProxyWrite.php.

130 {
131
132 return $this->principalBackend->getGroupMemberSet($this->getPrincipalUrl());
133
134 }
getPrincipalUrl()
Returns the full principal url.
Definition: ProxyWrite.php:116

References Sabre\CalDAV\Principal\ProxyWrite\getPrincipalUrl().

+ Here is the call graph for this function:

◆ getGroupMembership()

Sabre\CalDAV\Principal\ProxyWrite::getGroupMembership ( )

Returns the list of groups this principal is member of.

If this principal is a member of a (list of) groups, this function should return a list of principal uri's for it's members.

Returns
array

Implements Sabre\DAVACL\IPrincipal.

Definition at line 144 of file ProxyWrite.php.

144 {
145
146 return $this->principalBackend->getGroupMembership($this->getPrincipalUrl());
147
148 }

References Sabre\CalDAV\Principal\ProxyWrite\getPrincipalUrl().

+ Here is the call graph for this function:

◆ getLastModified()

Sabre\CalDAV\Principal\ProxyWrite::getLastModified ( )

Returns the last modification time.

Returns
null

Implements Sabre\DAV\INode.

Definition at line 66 of file ProxyWrite.php.

66 {
67
68 return null;
69
70 }

◆ getName()

Sabre\CalDAV\Principal\ProxyWrite::getName ( )

Returns this principals name.

Returns
string

Implements Sabre\DAV\INode.

Definition at line 55 of file ProxyWrite.php.

55 {
56
57 return 'calendar-proxy-write';
58
59 }

Referenced by Sabre\CalDAV\Principal\ProxyWrite\getDisplayName(), and Sabre\CalDAV\Principal\ProxyWrite\getPrincipalUrl().

+ Here is the caller graph for this function:

◆ getPrincipalUrl()

Sabre\CalDAV\Principal\ProxyWrite::getPrincipalUrl ( )

Returns the full principal url.

Returns
string

Implements Sabre\DAVACL\IPrincipal.

Definition at line 116 of file ProxyWrite.php.

116 {
117
118 return $this->principalInfo['uri'] . '/' . $this->getName();
119
120 }

References Sabre\CalDAV\Principal\ProxyWrite\getName().

Referenced by Sabre\CalDAV\Principal\ProxyWrite\getGroupMemberSet(), Sabre\CalDAV\Principal\ProxyWrite\getGroupMembership(), and Sabre\CalDAV\Principal\ProxyWrite\setGroupMemberSet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGroupMemberSet()

Sabre\CalDAV\Principal\ProxyWrite::setGroupMemberSet ( array  $principals)

Sets a list of group members.

If this principal is a group, this method sets all the group members. The list of members is always overwritten, never appended to.

This method should throw an exception if the members could not be set.

Parameters
array$principals
Returns
void

Implements Sabre\DAVACL\IPrincipal.

Definition at line 161 of file ProxyWrite.php.

161 {
162
163 $this->principalBackend->setGroupMemberSet($this->getPrincipalUrl(), $principals);
164
165 }

References Sabre\CalDAV\Principal\ProxyWrite\getPrincipalUrl().

+ Here is the call graph for this function:

◆ setName()

Sabre\CalDAV\Principal\ProxyWrite::setName (   $name)

Renames the node.

Parameters
string$nameThe new name
Exceptions
DAV

Exception\Forbidden

Returns
void

Implements Sabre\DAV\INode.

Definition at line 91 of file ProxyWrite.php.

91 {
92
93 throw new DAV\Exception\Forbidden('Permission denied to rename file');
94
95 }

Field Documentation

◆ $principalBackend

Sabre\CalDAV\Principal\ProxyWrite::$principalBackend
protected

Definition at line 33 of file ProxyWrite.php.

Referenced by Sabre\CalDAV\Principal\ProxyWrite\__construct().

◆ $principalInfo

Sabre\CalDAV\Principal\ProxyWrite::$principalInfo
protected

Definition at line 26 of file ProxyWrite.php.

Referenced by Sabre\CalDAV\Principal\ProxyWrite\__construct().


The documentation for this class was generated from the following file: