1
0

AddressBookShareUpdatedEvent.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /**
  17. * AddressBookShareUpdatedEvent constructor.
  18. *
  19. * @param int $addressBookId
  20. * @param array $addressBookData
  21. * @param array $oldShares
  22. * @param array $added
  23. * @param array $removed
  24. * @since 20.0.0
  25. */
  26. public function __construct(
  27. private int $addressBookId,
  28. private array $addressBookData,
  29. private array $oldShares,
  30. private array $added,
  31. private array $removed,
  32. ) {
  33. parent::__construct();
  34. }
  35. /**
  36. * @return int
  37. * @since 20.0.0
  38. */
  39. public function getAddressBookId(): int {
  40. return $this->addressBookId;
  41. }
  42. /**
  43. * @return array
  44. * @since 20.0.0
  45. */
  46. public function getAddressBookData(): array {
  47. return $this->addressBookData;
  48. }
  49. /**
  50. * @return array
  51. * @since 20.0.0
  52. */
  53. public function getOldShares(): array {
  54. return $this->oldShares;
  55. }
  56. /**
  57. * @return array
  58. * @since 20.0.0
  59. */
  60. public function getAdded(): array {
  61. return $this->added;
  62. }
  63. /**
  64. * @return array
  65. * @since 20.0.0
  66. */
  67. public function getRemoved(): array {
  68. return $this->removed;
  69. }
  70. }