ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PrincipalCollection.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAVACL;
4 
8 
20 
21  use ACLTrait;
22 
33  function getChildForPrincipal(array $principal) {
34 
35  return new Principal($this->principalBackend, $principal);
36 
37  }
38 
63  function createExtendedCollection($name, MkCol $mkCol) {
64 
65  if (!$mkCol->hasResourceType('{DAV:}principal')) {
66  throw new InvalidResourceType('Only resources of type {DAV:}principal may be created here');
67  }
68 
69  $this->principalBackend->createPrincipal(
70  $this->principalPrefix . '/' . $name,
71  $mkCol
72  );
73 
74  }
75 
88  function getACL() {
89  return [
90  [
91  'principal' => '{DAV:}authenticated',
92  'privilege' => '{DAV:}read',
93  'protected' => true,
94  ],
95  ];
96  }
97 
98 }
getChildForPrincipal(array $principal)
This method returns a node for a principal.
hasResourceType($resourceType)
Returns true or false if the MKCOL operation has at least the specified resource type.
Definition: MkCol.php:66
getACL()
Returns a list of ACE&#39;s for this node.
Principal class.
Definition: Principal.php:23
The IExtendedCollection interface.
createExtendedCollection($name, MkCol $mkCol)
Creates a new collection.
ACL-enabled node.
Definition: IACL.php:16
This class represents a MKCOL operation.
Definition: MkCol.php:23