1
0

ICalendar.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Calendar;
  8. /**
  9. * Interface ICalendar
  10. *
  11. * @since 13.0.0
  12. */
  13. interface ICalendar {
  14. /**
  15. * @return string defining the technical unique key
  16. * @since 13.0.0
  17. */
  18. public function getKey(): string;
  19. /**
  20. * In comparison to getKey() this function returns a unique uri within the scope of the principal
  21. * @since 24.0.0
  22. */
  23. public function getUri(): string;
  24. /**
  25. * In comparison to getKey() this function returns a human readable (maybe translated) name
  26. * @return null|string
  27. * @since 13.0.0
  28. */
  29. public function getDisplayName(): ?string;
  30. /**
  31. * Calendar color
  32. * @return null|string
  33. * @since 13.0.0
  34. */
  35. public function getDisplayColor(): ?string;
  36. /**
  37. * @param string $pattern which should match within the $searchProperties
  38. * @param array $searchProperties defines the properties within the query pattern should match
  39. * @param array $options - optional parameters:
  40. * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]]
  41. * @param int|null $limit - limit number of search results
  42. * @param int|null $offset - offset for paging of search results
  43. * @return array an array of events/journals/todos which are arrays of key-value-pairs. the events are sorted by start date (closest first, furthest last)
  44. * @since 13.0.0
  45. */
  46. public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array;
  47. /**
  48. * @return int build up using \OCP\Constants
  49. * @since 13.0.0
  50. */
  51. public function getPermissions(): int;
  52. /**
  53. * Whether the calendar is deleted
  54. * @since 26.0.0
  55. */
  56. public function isDeleted(): bool;
  57. }