AddressBookShareUpdatedEvent.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 AddressBookShareUpdatedEvent
  28. *
  29. * @package OCA\DAV\Events
  30. * @since 20.0.0
  31. */
  32. class AddressBookShareUpdatedEvent extends Event {
  33. /** @var int */
  34. private $addressBookId;
  35. /** @var array */
  36. private $addressBookData;
  37. /** @var array */
  38. private $oldShares;
  39. /** @var array */
  40. private $added;
  41. /** @var array */
  42. private $removed;
  43. /**
  44. * AddressBookShareUpdatedEvent constructor.
  45. *
  46. * @param int $addressBookId
  47. * @param array $addressBookData
  48. * @param array $oldShares
  49. * @param array $added
  50. * @param array $removed
  51. * @since 20.0.0
  52. */
  53. public function __construct(int $addressBookId,
  54. array $addressBookData,
  55. array $oldShares,
  56. array $added,
  57. array $removed) {
  58. parent::__construct();
  59. $this->addressBookId = $addressBookId;
  60. $this->addressBookData = $addressBookData;
  61. $this->oldShares = $oldShares;
  62. $this->added = $added;
  63. $this->removed = $removed;
  64. }
  65. /**
  66. * @return int
  67. * @since 20.0.0
  68. */
  69. public function getAddressBookId(): int {
  70. return $this->addressBookId;
  71. }
  72. /**
  73. * @return array
  74. * @since 20.0.0
  75. */
  76. public function getAddressBookData(): array {
  77. return $this->addressBookData;
  78. }
  79. /**
  80. * @return array
  81. * @since 20.0.0
  82. */
  83. public function getOldShares(): array {
  84. return $this->oldShares;
  85. }
  86. /**
  87. * @return array
  88. * @since 20.0.0
  89. */
  90. public function getAdded(): array {
  91. return $this->added;
  92. }
  93. /**
  94. * @return array
  95. * @since 20.0.0
  96. */
  97. public function getRemoved(): array {
  98. return $this->removed;
  99. }
  100. }