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

Abstract Principal Backend. More...

+ Inheritance diagram for Sabre\DAVACL\PrincipalBackend\AbstractBackend:
+ Collaboration diagram for Sabre\DAVACL\PrincipalBackend\AbstractBackend:

Public Member Functions

 findByUri ($uri, $principalPrefix)
 Finds a principal by its URI. More...
 
- Public Member Functions inherited from Sabre\DAVACL\PrincipalBackend\BackendInterface
 getPrincipalsByPrefix ($prefixPath)
 Returns a list of principals based on a prefix. More...
 
 getPrincipalByPath ($path)
 Returns a specific principal, specified by it's path. More...
 
 updatePrincipal ($path, \Sabre\DAV\PropPatch $propPatch)
 Updates one ore more webdav properties on a principal. More...
 
 searchPrincipals ($prefixPath, array $searchProperties, $test='allof')
 This method is used to search for principals matching a set of properties. More...
 
 getGroupMemberSet ($principal)
 Returns the list of members for a group-principal. More...
 
 getGroupMembership ($principal)
 Returns the list of groups a principal is a member of. More...
 
 setGroupMemberSet ($principal, array $members)
 Updates the list of group members for a group principal. More...
 

Detailed Description

Abstract Principal Backend.

Currently this class has no function. It's here for consistency and so we have a non-bc-breaking way to add a default generic implementation to functions we may add in the future.

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

Definition at line 16 of file AbstractBackend.php.

Member Function Documentation

◆ findByUri()

Sabre\DAVACL\PrincipalBackend\AbstractBackend::findByUri (   $uri,
  $principalPrefix 
)

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.

Parameters
string$uri
string$principalPrefix
Returns
string

Implements Sabre\DAVACL\PrincipalBackend\BackendInterface.

Definition at line 35 of file AbstractBackend.php.

References $result, and Sabre\DAVACL\PrincipalBackend\BackendInterface\searchPrincipals().

35  {
36 
37  // Note that the default implementation here is a bit slow and could
38  // likely be optimized.
39  if (substr($uri, 0, 7) !== 'mailto:') {
40  return;
41  }
42  $result = $this->searchPrincipals(
43  $principalPrefix,
44  ['{http://sabredav.org/ns}email-address' => substr($uri, 7)]
45  );
46 
47  if ($result) {
48  return $result[0];
49  }
50 
51  }
$result
searchPrincipals($prefixPath, array $searchProperties, $test='allof')
This method is used to search for principals matching a set of properties.
+ Here is the call graph for this function:

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