1
0

SubscriptionCreatedEvent.php 884 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 SubscriptionCreatedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class SubscriptionCreatedEvent extends Event {
  16. /**
  17. * SubscriptionCreatedEvent constructor.
  18. *
  19. * @param int $subscriptionId
  20. * @param array $subscriptionData
  21. * @since 20.0.0
  22. */
  23. public function __construct(
  24. private int $subscriptionId,
  25. private array $subscriptionData,
  26. ) {
  27. parent::__construct();
  28. }
  29. /**
  30. * @return int
  31. * @since 20.0.0
  32. */
  33. public function getSubscriptionId(): int {
  34. return $this->subscriptionId;
  35. }
  36. /**
  37. * @return array
  38. * @since 20.0.0
  39. */
  40. public function getSubscriptionData(): array {
  41. return $this->subscriptionData;
  42. }
  43. }