AddressBookShareUpdatedEvent.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 AddressBookShareUpdatedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class AddressBookShareUpdatedEvent extends Event {
  16. /** @var int */
  17. private $addressBookId;
  18. /** @var array */
  19. private $addressBookData;
  20. /** @var array */
  21. private $oldShares;
  22. /** @var array */
  23. private $added;
  24. /** @var array */
  25. private $removed;
  26. /**
  27. * AddressBookShareUpdatedEvent constructor.
  28. *
  29. * @param int $addressBookId
  30. * @param array $addressBookData
  31. * @param array $oldShares
  32. * @param array $added
  33. * @param array $removed
  34. * @since 20.0.0
  35. */
  36. public function __construct(int $addressBookId,
  37. array $addressBookData,
  38. array $oldShares,
  39. array $added,
  40. array $removed) {
  41. parent::__construct();
  42. $this->addressBookId = $addressBookId;
  43. $this->addressBookData = $addressBookData;
  44. $this->oldShares = $oldShares;
  45. $this->added = $added;
  46. $this->removed = $removed;
  47. }
  48. /**
  49. * @return int
  50. * @since 20.0.0
  51. */
  52. public function getAddressBookId(): int {
  53. return $this->addressBookId;
  54. }
  55. /**
  56. * @return array
  57. * @since 20.0.0
  58. */
  59. public function getAddressBookData(): array {
  60. return $this->addressBookData;
  61. }
  62. /**
  63. * @return array
  64. * @since 20.0.0
  65. */
  66. public function getOldShares(): array {
  67. return $this->oldShares;
  68. }
  69. /**
  70. * @return array
  71. * @since 20.0.0
  72. */
  73. public function getAdded(): array {
  74. return $this->added;
  75. }
  76. /**
  77. * @return array
  78. * @since 20.0.0
  79. */
  80. public function getRemoved(): array {
  81. return $this->removed;
  82. }
  83. }