]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAVACL/IPrincipal.php
Merge branch 'master' of git://github.com/friendica/friendica-addons
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAVACL / IPrincipal.php
1 <?php
2
3 /**
4  * IPrincipal interface
5  *
6  * Implement this interface to define your own principals
7  *
8  * @package Sabre
9  * @subpackage DAVACL
10  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
11  * @author Evert Pot (http://www.rooftopsolutions.nl/)
12  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
13  */
14 interface Sabre_DAVACL_IPrincipal extends Sabre_DAV_INode {
15
16     /**
17      * Returns a list of alternative urls for a principal
18      *
19      * This can for example be an email address, or ldap url.
20      *
21      * @return array
22      */
23     function getAlternateUriSet();
24
25     /**
26      * Returns the full principal url
27      *
28      * @return string
29      */
30     function getPrincipalUrl();
31
32     /**
33      * Returns the list of group members
34      *
35      * If this principal is a group, this function should return
36      * all member principal uri's for the group.
37      *
38      * @return array
39      */
40     function getGroupMemberSet();
41
42     /**
43      * Returns the list of groups this principal is member of
44      *
45      * If this principal is a member of a (list of) groups, this function
46      * should return a list of principal uri's for it's members.
47      *
48      * @return array
49      */
50     function getGroupMembership();
51
52     /**
53      * Sets a list of group members
54      *
55      * If this principal is a group, this method sets all the group members.
56      * The list of members is always overwritten, never appended to.
57      *
58      * This method should throw an exception if the members could not be set.
59      *
60      * @param array $principals
61      * @return void
62      */
63     function setGroupMemberSet(array $principals);
64
65     /**
66      * Returns the displayname
67      *
68      * This should be a human readable name for the principal.
69      * If none is available, return the nodename.
70      *
71      * @return string
72      */
73     function getDisplayName();
74
75 }