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