1<?php 2 3namespace Sabre\DAVACL; 4 5use Sabre\DAV; 6 7/** 8 * IPrincipal interface 9 * 10 * Implement this interface to define your own principals 11 * 12 * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/). 13 * @author Evert Pot (http://evertpot.com/) 14 * @license http://sabre.io/license/ Modified BSD License 15 */ 16interface IPrincipal extends DAV\INode { 17 18 /** 19 * Returns a list of alternative urls for a principal 20 * 21 * This can for example be an email address, or ldap url. 22 * 23 * @return array 24 */ 25 function getAlternateUriSet(); 26 27 /** 28 * Returns the full principal url 29 * 30 * @return string 31 */ 32 function getPrincipalUrl(); 33 34 /** 35 * Returns the list of group members 36 * 37 * If this principal is a group, this function should return 38 * all member principal uri's for the group. 39 * 40 * @return array 41 */ 42 function getGroupMemberSet(); 43 44 /** 45 * Returns the list of groups this principal is member of 46 * 47 * If this principal is a member of a (list of) groups, this function 48 * should return a list of principal uri's for it's members. 49 * 50 * @return array 51 */ 52 function getGroupMembership(); 53 54 /** 55 * Sets a list of group members 56 * 57 * If this principal is a group, this method sets all the group members. 58 * The list of members is always overwritten, never appended to. 59 * 60 * This method should throw an exception if the members could not be set. 61 * 62 * @param array $principals 63 * @return void 64 */ 65 function setGroupMemberSet(array $principals); 66 67 /** 68 * Returns the displayname 69 * 70 * This should be a human readable name for the principal. 71 * If none is available, return the nodename. 72 * 73 * @return string 74 */ 75 function getDisplayName(); 76 77} 78