ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\MockPrincipal Class Reference
+ Inheritance diagram for Sabre\DAVACL\MockPrincipal:
+ Collaboration diagram for Sabre\DAVACL\MockPrincipal:

Public Member Functions

 __construct ($name, $principalUrl, array $groupMembership=[], array $groupMemberSet=[])
 
 getName ()
 Returns the name of the node. 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 ()
 
 setGroupMemberSet (array $groupMemberSet)
 Sets a list of group members. More...
 
- Public Member Functions inherited from Sabre\DAV\Node
 getLastModified ()
 Returns the last modification time as a unix timestamp. More...
 
 delete ()
 Deletes the current node. More...
 
 setName ($name)
 Renames the node. More...
 
- Public Member Functions inherited from Sabre\DAVACL\IPrincipal
 getGroupMembership ()
 Returns the list of groups this principal is member of. More...
 

Data Fields

 $name
 
 $principalUrl
 
 $groupMembership = []
 
 $groupMemberSet = []
 

Detailed Description

Definition at line 7 of file MockPrincipal.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\DAVACL\MockPrincipal::__construct (   $name,
  $principalUrl,
array  $groupMembership = [],
array  $groupMemberSet = [] 
)

Member Function Documentation

◆ getAlternateUriSet()

Sabre\DAVACL\MockPrincipal::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 35 of file MockPrincipal.php.

35  {
36 
37  return [];
38 
39  }

◆ getDisplayName()

Sabre\DAVACL\MockPrincipal::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 29 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\getName().

29  {
30 
31  return $this->getName();
32 
33  }
getName()
Returns the name of the node.
+ Here is the call graph for this function:

◆ getGroupMemberSet()

Sabre\DAVACL\MockPrincipal::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 47 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\$groupMemberSet.

47  {
48 
49  return $this->groupMemberSet;
50 
51  }

◆ getGroupMemberShip()

Sabre\DAVACL\MockPrincipal::getGroupMemberShip ( )

Definition at line 53 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\$groupMembership.

53  {
54 
56 
57  }

◆ getName()

Sabre\DAVACL\MockPrincipal::getName ( )

Returns the name of the node.

This is used to generate the url.

Returns
string

Implements Sabre\DAV\INode.

Definition at line 23 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\$name.

Referenced by Sabre\DAVACL\MockPrincipal\getDisplayName().

23  {
24 
25  return $this->name;
26 
27  }
+ Here is the caller graph for this function:

◆ getPrincipalUrl()

Sabre\DAVACL\MockPrincipal::getPrincipalUrl ( )

Returns the full principal url.

Returns
string

Implements Sabre\DAVACL\IPrincipal.

Definition at line 41 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\$principalUrl.

41  {
42 
43  return $this->principalUrl;
44 
45  }

◆ setGroupMemberSet()

Sabre\DAVACL\MockPrincipal::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 59 of file MockPrincipal.php.

References Sabre\DAVACL\MockPrincipal\$groupMemberSet.

59  {
60 
61  $this->groupMemberSet = $groupMemberSet;
62 
63  }

Field Documentation

◆ $groupMemberSet

Sabre\DAVACL\MockPrincipal::$groupMemberSet = []

◆ $groupMembership

Sabre\DAVACL\MockPrincipal::$groupMembership = []

◆ $name

Sabre\DAVACL\MockPrincipal::$name

◆ $principalUrl

Sabre\DAVACL\MockPrincipal::$principalUrl

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