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