ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\PrincipalCollection Class Reference

Principals Collection. More...

+ Inheritance diagram for Sabre\DAVACL\PrincipalCollection:
+ Collaboration diagram for Sabre\DAVACL\PrincipalCollection:

Public Member Functions

 getChildForPrincipal (array $principal)
 This method returns a node for a principal. More...
 
 createExtendedCollection ($name, MkCol $mkCol)
 Creates a new collection. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
- Public Member Functions inherited from Sabre\DAVACL\AbstractPrincipalCollection
 __construct (PrincipalBackend\BackendInterface $principalBackend, $principalPrefix='principals')
 Creates the object. More...
 
 getChildForPrincipal (array $principalInfo)
 This method returns a node for a principal. More...
 
 getName ()
 Returns the name of this collection. More...
 
 getChildren ()
 Return the list of users. More...
 
 getChild ($name)
 Returns a child object, by its name. More...
 
 searchPrincipals (array $searchProperties, $test='allof')
 This method is used to search for principals matching a set of properties. More...
 
 findByUri ($uri)
 Finds a principal by its URI. More...
 
- Public Member Functions inherited from Sabre\DAV\Collection
 getChild ($name)
 Returns a child object, by its name. More...
 
 childExists ($name)
 Checks is a child-node exists. More...
 
 createFile ($name, $data=null)
 Creates a new file in the directory. More...
 
 createDirectory ($name)
 Creates a new subdirectory. 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\IACL
 getOwner ()
 Returns the owner principal. More...
 
 getGroup ()
 Returns a group principal. More...
 
 setACL (array $acl)
 Updates the ACL. More...
 
 getSupportedPrivilegeSet ()
 Returns the list of supported privileges for this node. More...
 

Additional Inherited Members

- Data Fields inherited from Sabre\DAVACL\AbstractPrincipalCollection
 $disableListing = false
 
- Protected Attributes inherited from Sabre\DAVACL\AbstractPrincipalCollection
 $principalBackend
 
 $principalPrefix
 

Detailed Description

Principals Collection.

This collection represents a list of users. The users are instances of Sabre

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

Definition at line 19 of file PrincipalCollection.php.

Member Function Documentation

◆ createExtendedCollection()

Sabre\DAVACL\PrincipalCollection::createExtendedCollection (   $name,
MkCol  $mkCol 
)

Creates a new collection.

This method will receive a MkCol object with all the information about the new collection that's being created.

The MkCol object contains information about the resourceType of the new collection. If you don't support the specified resourceType, you should throw Exception.

The object also contains a list of WebDAV properties for the new collection.

You should call the handle() method on this object to specify exactly which properties you are storing. This allows the system to figure out exactly which properties you didn't store, which in turn allows other plugins (such as the propertystorage plugin) to handle storing the property for you.

Parameters
string$name
MkCol$mkCol
Exceptions
InvalidResourceType
Returns
void

Implements Sabre\DAV\IExtendedCollection.

Definition at line 63 of file PrincipalCollection.php.

References $name, and Sabre\DAV\MkCol\hasResourceType().

63  {
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  }
+ Here is the call graph for this function:

◆ getACL()

Sabre\DAVACL\PrincipalCollection::getACL ( )

Returns a list of ACE's for this node.

Each ACE has the following properties:

  • 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges
  • 'principal', a url to the principal who owns the node
  • 'protected' (optional), indicating that this ACE is not allowed to be updated.
Returns
array

Implements Sabre\DAVACL\IACL.

Definition at line 88 of file PrincipalCollection.php.

88  {
89  return [
90  [
91  'principal' => '{DAV:}authenticated',
92  'privilege' => '{DAV:}read',
93  'protected' => true,
94  ],
95  ];
96  }

◆ getChildForPrincipal()

Sabre\DAVACL\PrincipalCollection::getChildForPrincipal ( array  $principal)

This method returns a node for a principal.

The passed array contains principal information, and is guaranteed to at least contain a uri item. Other properties may or may not be supplied by the authentication backend.

Parameters
array$principal
Returns

Definition at line 33 of file PrincipalCollection.php.

33  {
34 
35  return new Principal($this->principalBackend, $principal);
36 
37  }

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