ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MockPrincipal.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAVACL;
4 
5 use Sabre\DAV;
6 
7 class MockPrincipal extends DAV\Node implements IPrincipal {
8 
9  public $name;
10  public $principalUrl;
11  public $groupMembership = [];
12  public $groupMemberSet = [];
13 
14  function __construct($name, $principalUrl, array $groupMembership = [], array $groupMemberSet = []) {
15 
16  $this->name = $name;
17  $this->principalUrl = $principalUrl;
18  $this->groupMembership = $groupMembership;
19  $this->groupMemberSet = $groupMemberSet;
20 
21  }
22 
23  function getName() {
24 
25  return $this->name;
26 
27  }
28 
29  function getDisplayName() {
30 
31  return $this->getName();
32 
33  }
34 
35  function getAlternateUriSet() {
36 
37  return [];
38 
39  }
40 
41  function getPrincipalUrl() {
42 
43  return $this->principalUrl;
44 
45  }
46 
47  function getGroupMemberSet() {
48 
49  return $this->groupMemberSet;
50 
51  }
52 
53  function getGroupMemberShip() {
54 
56 
57  }
58 
60 
61  $this->groupMemberSet = $groupMemberSet;
62 
63  }
64 }
__construct($name, $principalUrl, array $groupMembership=[], array $groupMemberSet=[])
getDisplayName()
Returns the displayname.
getName()
Returns the name of the node.
getPrincipalUrl()
Returns the full principal url.
getAlternateUriSet()
Returns a list of alternative urls for a principal.
setGroupMemberSet(array $groupMemberSet)
Sets a list of group members.
Node class.
Definition: Node.php:14
getGroupMemberSet()
Returns the list of group members.
IPrincipal interface.
Definition: IPrincipal.php:16