1
0

CardCreatedEvent.php 1.4 KB

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