CardMovedEvent.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 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 CardMovedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 27.0.0
  14. */
  15. class CardMovedEvent extends Event {
  16. private int $sourceAddressBookId;
  17. private array $sourceAddressBookData;
  18. private int $targetAddressBookId;
  19. private array $targetAddressBookData;
  20. private array $sourceShares;
  21. private array $targetShares;
  22. private array $objectData;
  23. /**
  24. * @since 27.0.0
  25. */
  26. public function __construct(int $sourceAddressBookId,
  27. array $sourceAddressBookData,
  28. int $targetAddressBookId,
  29. array $targetAddressBookData,
  30. array $sourceShares,
  31. array $targetShares,
  32. array $objectData) {
  33. parent::__construct();
  34. $this->sourceAddressBookId = $sourceAddressBookId;
  35. $this->sourceAddressBookData = $sourceAddressBookData;
  36. $this->targetAddressBookId = $targetAddressBookId;
  37. $this->targetAddressBookData = $targetAddressBookData;
  38. $this->sourceShares = $sourceShares;
  39. $this->targetShares = $targetShares;
  40. $this->objectData = $objectData;
  41. }
  42. /**
  43. * @return int
  44. * @since 27.0.0
  45. */
  46. public function getSourceAddressBookId(): int {
  47. return $this->sourceAddressBookId;
  48. }
  49. /**
  50. * @return array
  51. * @since 27.0.0
  52. */
  53. public function getSourceAddressBookData(): array {
  54. return $this->sourceAddressBookData;
  55. }
  56. /**
  57. * @return int
  58. * @since 27.0.0
  59. */
  60. public function getTargetAddressBookId(): int {
  61. return $this->targetAddressBookId;
  62. }
  63. /**
  64. * @return array
  65. * @since 27.0.0
  66. */
  67. public function getTargetAddressBookData(): array {
  68. return $this->targetAddressBookData;
  69. }
  70. /**
  71. * @return array
  72. * @since 27.0.0
  73. */
  74. public function getSourceShares(): array {
  75. return $this->sourceShares;
  76. }
  77. /**
  78. * @return array
  79. * @since 27.0.0
  80. */
  81. public function getTargetShares(): array {
  82. return $this->targetShares;
  83. }
  84. /**
  85. * @return array
  86. * @since 27.0.0
  87. */
  88. public function getObjectData(): array {
  89. return $this->objectData;
  90. }
  91. }