1
0

IBackend.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Calendar\Resource;
  7. use OCP\Calendar\BackendTemporarilyUnavailableException;
  8. /**
  9. * Interface IBackend
  10. *
  11. * @since 14.0.0
  12. */
  13. interface IBackend {
  14. /**
  15. * get a list of all resources in this backend
  16. *
  17. * @throws BackendTemporarilyUnavailableException
  18. * @return IResource[]
  19. * @since 14.0.0
  20. */
  21. public function getAllResources():array;
  22. /**
  23. * get a list of all resource identifiers in this backend
  24. *
  25. * @throws BackendTemporarilyUnavailableException
  26. * @return string[]
  27. * @since 14.0.0
  28. */
  29. public function listAllResources():array;
  30. /**
  31. * get a resource by it's id
  32. *
  33. * @param string $id
  34. * @throws BackendTemporarilyUnavailableException
  35. * @return IResource|null
  36. * @since 14.0.0
  37. */
  38. public function getResource($id);
  39. /**
  40. * Get unique identifier of the backend
  41. *
  42. * @return string
  43. * @since 14.0.0
  44. */
  45. public function getBackendIdentifier():string;
  46. }