1
0

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