ISharedNode.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV\Sharing;
  4. use Sabre\DAV\INode;
  5. /**
  6. * This interface represents a resource that has sharing capabilities, either
  7. * because it's possible for an owner to share the resource, or because this is
  8. * an instance of a shared resource.
  9. *
  10. * @copyright Copyright (C) fruux GmbH. (https://fruux.com/)
  11. * @author Evert Pot (http://evertpot.com/)
  12. * @license http://sabre.io/license/ Modified BSD License
  13. */
  14. interface ISharedNode extends INode
  15. {
  16. /**
  17. * Returns the 'access level' for the instance of this shared resource.
  18. *
  19. * The value should be one of the Sabre\DAV\Sharing\Plugin::ACCESS_
  20. * constants.
  21. *
  22. * @return int
  23. */
  24. public function getShareAccess();
  25. /**
  26. * This function must return a URI that uniquely identifies the shared
  27. * resource. This URI should be identical across instances, and is
  28. * also used in several other XML bodies to connect invites to
  29. * resources.
  30. *
  31. * This may simply be a relative reference to the original shared instance,
  32. * but it could also be a urn. As long as it's a valid URI and unique.
  33. *
  34. * @return string
  35. */
  36. public function getShareResourceUri();
  37. /**
  38. * Updates the list of sharees.
  39. *
  40. * Every item must be a Sharee object.
  41. *
  42. * @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
  43. */
  44. public function updateInvites(array $sharees);
  45. /**
  46. * Returns the list of people whom this resource is shared with.
  47. *
  48. * Every item in the returned array must be a Sharee object with
  49. * at least the following properties set:
  50. *
  51. * * $href
  52. * * $shareAccess
  53. * * $inviteStatus
  54. *
  55. * and optionally:
  56. *
  57. * * $properties
  58. *
  59. * @return \Sabre\DAV\Xml\Element\Sharee[]
  60. */
  61. public function getInvites();
  62. }