1
0

AddressBookDeletedEvent.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 AddressBookDeletedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class AddressBookDeletedEvent extends Event {
  16. /** @var int */
  17. private $addressBookId;
  18. /** @var array */
  19. private $addressBookData;
  20. /** @var array */
  21. private $shares;
  22. /**
  23. * AddressBookDeletedEvent constructor.
  24. *
  25. * @param int $addressBookId
  26. * @param array $addressBookData
  27. * @param array $shares
  28. * @since 20.0.0
  29. */
  30. public function __construct(int $addressBookId,
  31. array $addressBookData,
  32. array $shares) {
  33. parent::__construct();
  34. $this->addressBookId = $addressBookId;
  35. $this->addressBookData = $addressBookData;
  36. $this->shares = $shares;
  37. }
  38. /**
  39. * @return int
  40. * @since 20.0.0
  41. */
  42. public function getAddressBookId():int {
  43. return $this->addressBookId;
  44. }
  45. /**
  46. * @return array
  47. * @since 20.0.0
  48. */
  49. public function getAddressBookData(): array {
  50. return $this->addressBookData;
  51. }
  52. /**
  53. * @return array
  54. * @since 20.0.0
  55. */
  56. public function getShares(): array {
  57. return $this->shares;
  58. }
  59. }