IPrincipal.php 1.9 KB

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