CalendarObjectCreatedEvent.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 CalendarObjectCreatedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class CalendarObjectCreatedEvent extends Event {
  16. /** @var int */
  17. private $calendarId;
  18. /** @var array */
  19. private $calendarData;
  20. /** @var array */
  21. private $shares;
  22. /** @var array */
  23. private $objectData;
  24. /**
  25. * CalendarObjectCreatedEvent constructor.
  26. *
  27. * @param int $calendarId
  28. * @param array $calendarData
  29. * @param array $shares
  30. * @param array $objectData
  31. * @since 20.0.0
  32. */
  33. public function __construct(int $calendarId,
  34. array $calendarData,
  35. array $shares,
  36. array $objectData) {
  37. parent::__construct();
  38. $this->calendarId = $calendarId;
  39. $this->calendarData = $calendarData;
  40. $this->shares = $shares;
  41. $this->objectData = $objectData;
  42. }
  43. /**
  44. * @return int
  45. * @since 20.0.0
  46. */
  47. public function getCalendarId(): int {
  48. return $this->calendarId;
  49. }
  50. /**
  51. * @return array
  52. * @since 20.0.0
  53. */
  54. public function getCalendarData(): array {
  55. return $this->calendarData;
  56. }
  57. /**
  58. * @return array
  59. * @since 20.0.0
  60. */
  61. public function getShares(): array {
  62. return $this->shares;
  63. }
  64. /**
  65. * @return array
  66. * @since 20.0.0
  67. */
  68. public function getObjectData(): array {
  69. return $this->objectData;
  70. }
  71. }