ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Principals Collection. More...
Public Member Functions | |
__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... | |
![]() | |
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... | |
![]() | |
getLastModified () | |
Returns the last modification time as a unix timestamp. More... | |
delete () | |
Deletes the current node. More... | |
setName ($name) | |
Renames the node. More... | |
Data Fields | |
$disableListing = false | |
Protected Attributes | |
$principalBackend | |
$principalPrefix | |
Principals Collection.
This is a helper class that easily allows you to create a collection that has a childnode for every principal.
To use this class, simply implement the getChildForPrincipal method.
Definition at line 20 of file AbstractPrincipalCollection.php.
Sabre\DAVACL\AbstractPrincipalCollection::__construct | ( | PrincipalBackend\BackendInterface | $principalBackend, |
$principalPrefix = 'principals' |
|||
) |
Creates the object.
This object must be passed the principal backend. This object will filter all principals from a specified prefix ($principalPrefix). The default is 'principals', if your principals are stored in a different collection, override $principalPrefix
PrincipalBackend\BackendInterface | $principalBackend | |
string | $principalPrefix |
Definition at line 56 of file AbstractPrincipalCollection.php.
References Sabre\DAVACL\AbstractPrincipalCollection\$principalBackend, Sabre\DAVACL\AbstractPrincipalCollection\$principalPrefix, and Sabre\DAVACL\AbstractPrincipalCollection\getChildForPrincipal().
Sabre\DAVACL\AbstractPrincipalCollection::findByUri | ( | $uri | ) |
Finds a principal by its URI.
This method may receive any type of uri, but mailto: addresses will be the most common.
Implementation of this API is optional. It is currently used by the CalDAV system to find principals based on their email addresses. If this API is not implemented, some features may not work correctly.
This method must return a relative principal path, or null, if the principal was not found or you refuse to find it.
string | $uri |
Implements Sabre\DAVACL\IPrincipalCollection.
Definition at line 175 of file AbstractPrincipalCollection.php.
Sabre\DAVACL\AbstractPrincipalCollection::getChild | ( | $name | ) |
Returns a child object, by its name.
string | $name |
DAV |
Implements Sabre\DAV\ICollection.
Definition at line 115 of file AbstractPrincipalCollection.php.
References $name, and Sabre\DAVACL\AbstractPrincipalCollection\getChildForPrincipal().
|
abstract |
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.
array | $principalInfo |
Referenced by Sabre\DAVACL\AbstractPrincipalCollection\__construct(), Sabre\DAVACL\AbstractPrincipalCollection\getChild(), and Sabre\DAVACL\AbstractPrincipalCollection\getChildren().
Sabre\DAVACL\AbstractPrincipalCollection::getChildren | ( | ) |
Return the list of users.
Implements Sabre\DAV\ICollection.
Definition at line 92 of file AbstractPrincipalCollection.php.
References Sabre\DAVACL\AbstractPrincipalCollection\getChildForPrincipal().
Sabre\DAVACL\AbstractPrincipalCollection::getName | ( | ) |
Returns the name of this collection.
Implements Sabre\DAV\INode.
Definition at line 80 of file AbstractPrincipalCollection.php.
References $name, and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAVACL\AbstractPrincipalCollection::searchPrincipals | ( | array | $searchProperties, |
$test = 'allof' |
|||
) |
This method is used to search for principals matching a set of properties.
This search is specifically used by RFC3744's principal-property-search REPORT. You should at least allow searching on http://sabredav.org/ns}email-address.
The actual search should be a unicode-non-case-sensitive search. The keys in searchProperties are the WebDAV property names, while the values are the property values to search on.
By default, if multiple properties are submitted to this method, the various properties should be combined with 'AND'. If $test is set to 'anyof', it should be combined using 'OR'.
This method should simply return a list of 'child names', which may be used to call $this->getChild in the future.
array | $searchProperties | |
string | $test |
Implements Sabre\DAVACL\IPrincipalCollection.
Definition at line 146 of file AbstractPrincipalCollection.php.
References $r, $result, $row, $test, and Sabre\HTTP\URLUtil\splitPath().
Sabre\DAVACL\AbstractPrincipalCollection::$disableListing = false |
Definition at line 42 of file AbstractPrincipalCollection.php.
|
protected |
Definition at line 27 of file AbstractPrincipalCollection.php.
Referenced by Sabre\DAVACL\AbstractPrincipalCollection\__construct().
|
protected |
Definition at line 34 of file AbstractPrincipalCollection.php.
Referenced by Sabre\CalDAV\CalendarRoot\__construct(), Sabre\CardDAV\AddressBookRoot\__construct(), Sabre\DAVACL\FS\HomeCollection\__construct(), and Sabre\DAVACL\AbstractPrincipalCollection\__construct().