CalendarPublishedEvent.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\DAV\Events;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * Class CalendarPublishedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class CalendarPublishedEvent extends Event {
  16. private int $calendarId;
  17. private array $calendarData;
  18. private string $publicUri;
  19. /**
  20. * CalendarPublishedEvent constructor.
  21. *
  22. * @param int $calendarId
  23. * @param array $calendarData
  24. * @param string $publicUri
  25. * @since 20.0.0
  26. */
  27. public function __construct(int $calendarId,
  28. array $calendarData,
  29. string $publicUri) {
  30. parent::__construct();
  31. $this->calendarId = $calendarId;
  32. $this->calendarData = $calendarData;
  33. $this->publicUri = $publicUri;
  34. }
  35. /**
  36. * @return int
  37. * @since 20.0.0
  38. */
  39. public function getCalendarId(): int {
  40. return $this->calendarId;
  41. }
  42. /**
  43. * @return array
  44. * @since 20.0.0
  45. */
  46. public function getCalendarData(): array {
  47. return $this->calendarData;
  48. }
  49. /**
  50. * @return string
  51. * @since 20.0.0
  52. */
  53. public function getPublicUri(): string {
  54. return $this->publicUri;
  55. }
  56. }