1
0

AddressBookCreatedEvent.php 873 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /**
  17. * AddressBookCreatedEvent constructor.
  18. *
  19. * @param int $addressBookId
  20. * @param array $addressBookData
  21. * @since 20.0.0
  22. */
  23. public function __construct(
  24. private int $addressBookId,
  25. private array $addressBookData,
  26. ) {
  27. parent::__construct();
  28. }
  29. /**
  30. * @return int
  31. * @since 20.0.0
  32. */
  33. public function getAddressBookId(): int {
  34. return $this->addressBookId;
  35. }
  36. /**
  37. * @return array
  38. * @since 20.0.0
  39. */
  40. public function getAddressBookData(): array {
  41. return $this->addressBookData;
  42. }
  43. }