SubscriptionDeletedEvent.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2020, Georg Ehrke
  5. *
  6. * @author Georg Ehrke <oc.list@georgehrke.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\DAV\Events;
  25. use OCP\EventDispatcher\Event;
  26. /**
  27. * Class SubscriptionDeletedEvent
  28. *
  29. * @package OCA\DAV\Events
  30. * @since 20.0.0
  31. */
  32. class SubscriptionDeletedEvent extends Event {
  33. /** @var int */
  34. private $subscriptionId;
  35. /** @var array */
  36. private $subscriptionData;
  37. /** @var array */
  38. private $shares;
  39. /**
  40. * SubscriptionDeletedEvent constructor.
  41. *
  42. * @param int $subscriptionId
  43. * @param array $subscriptionData
  44. * @param array $shares
  45. * @since 20.0.0
  46. */
  47. public function __construct(int $subscriptionId,
  48. array $subscriptionData,
  49. array $shares) {
  50. parent::__construct();
  51. $this->subscriptionId = $subscriptionId;
  52. $this->subscriptionData = $subscriptionData;
  53. $this->shares = $shares;
  54. }
  55. /**
  56. * @return int
  57. * @since 20.0.0
  58. */
  59. public function getSubscriptionId(): int {
  60. return $this->subscriptionId;
  61. }
  62. /**
  63. * @return array
  64. * @since 20.0.0
  65. */
  66. public function getSubscriptionData(): array {
  67. return $this->subscriptionData;
  68. }
  69. /**
  70. * @return array
  71. * @since 20.0.0
  72. */
  73. public function getShares(): array {
  74. return $this->shares;
  75. }
  76. }