CalendarCreatedEvent.php 976 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 CalendarCreatedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class CalendarCreatedEvent extends Event {
  16. /** @var int */
  17. private $calendarId;
  18. /** @var array */
  19. private $calendarData;
  20. /**
  21. * CalendarCreatedEvent constructor.
  22. *
  23. * @param int $calendarId
  24. * @param array $calendarData
  25. * @since 20.0.0
  26. */
  27. public function __construct(int $calendarId,
  28. array $calendarData) {
  29. parent::__construct();
  30. $this->calendarId = $calendarId;
  31. $this->calendarData = $calendarData;
  32. }
  33. /**
  34. * @return int
  35. * @since 20.0.0
  36. */
  37. public function getCalendarId(): int {
  38. return $this->calendarId;
  39. }
  40. /**
  41. * @return array
  42. * @since 20.0.0
  43. */
  44. public function getCalendarData(): array {
  45. return $this->calendarData;
  46. }
  47. }