AddressBookCreatedEvent.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 AddressBookCreatedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class AddressBookCreatedEvent extends Event {
  16. /** @var int */
  17. private $addressBookId;
  18. /** @var array */
  19. private $addressBookData;
  20. /**
  21. * AddressBookCreatedEvent constructor.
  22. *
  23. * @param int $addressBookId
  24. * @param array $addressBookData
  25. * @since 20.0.0
  26. */
  27. public function __construct(int $addressBookId,
  28. array $addressBookData) {
  29. parent::__construct();
  30. $this->addressBookId = $addressBookId;
  31. $this->addressBookData = $addressBookData;
  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. }