CalendarObjectMovedEvent.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2020, Georg Ehrke
  5. *
  6. * @author Georg Ehrke <oc.list@georgehrke.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\DAV\Events;
  25. use OCP\EventDispatcher\Event;
  26. /**
  27. * Class CalendarObjectMovedEvent
  28. *
  29. * @package OCA\DAV\Events
  30. * @since 25.0.0
  31. */
  32. class CalendarObjectMovedEvent extends Event {
  33. private int $sourceCalendarId;
  34. private array $sourceCalendarData;
  35. private int $targetCalendarId;
  36. private array $targetCalendarData;
  37. private array $sourceShares;
  38. private array $targetShares;
  39. private array $objectData;
  40. /**
  41. * @since 25.0.0
  42. */
  43. public function __construct(int $sourceCalendarId,
  44. array $sourceCalendarData,
  45. int $targetCalendarId,
  46. array $targetCalendarData,
  47. array $sourceShares,
  48. array $targetShares,
  49. array $objectData) {
  50. parent::__construct();
  51. $this->sourceCalendarId = $sourceCalendarId;
  52. $this->sourceCalendarData = $sourceCalendarData;
  53. $this->targetCalendarId = $targetCalendarId;
  54. $this->targetCalendarData = $targetCalendarData;
  55. $this->sourceShares = $sourceShares;
  56. $this->targetShares = $targetShares;
  57. $this->objectData = $objectData;
  58. }
  59. /**
  60. * @return int
  61. * @since 25.0.0
  62. */
  63. public function getSourceCalendarId(): int {
  64. return $this->sourceCalendarId;
  65. }
  66. /**
  67. * @return array
  68. * @since 25.0.0
  69. */
  70. public function getSourceCalendarData(): array {
  71. return $this->sourceCalendarData;
  72. }
  73. /**
  74. * @return int
  75. * @since 25.0.0
  76. */
  77. public function getTargetCalendarId(): int {
  78. return $this->targetCalendarId;
  79. }
  80. /**
  81. * @return array
  82. * @since 25.0.0
  83. */
  84. public function getTargetCalendarData(): array {
  85. return $this->targetCalendarData;
  86. }
  87. /**
  88. * @return array
  89. * @since 25.0.0
  90. */
  91. public function getSourceShares(): array {
  92. return $this->sourceShares;
  93. }
  94. /**
  95. * @return array
  96. * @since 25.0.0
  97. */
  98. public function getTargetShares(): array {
  99. return $this->targetShares;
  100. }
  101. /**
  102. * @return array
  103. * @since 25.0.0
  104. */
  105. public function getObjectData(): array {
  106. return $this->objectData;
  107. }
  108. }