ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PrincipalCollection.php
Go to the documentation of this file.
1<?php
2
3namespace 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
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}
An exception for terminatinating execution or to throw for unit testing.
getChildForPrincipal(array $principal)
This method returns a node for a principal.
getACL()
Returns a list of ACE's for this node.
createExtendedCollection($name, MkCol $mkCol)
Creates a new collection.
Principal class.
Definition: Principal.php:23
This class represents a MKCOL operation.
Definition: MkCol.php:23
hasResourceType($resourceType)
Returns true or false if the MKCOL operation has at least the specified resource type.
Definition: MkCol.php:66
ACL-enabled node.
Definition: IACL.php:16
The IExtendedCollection interface.