1
0

UserAddedEvent.php 775 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Group\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IGroup;
  10. use OCP\IUser;
  11. /**
  12. * @since 18.0.0
  13. */
  14. class UserAddedEvent extends Event {
  15. /** @var IGroup */
  16. private $group;
  17. /*** @var IUser */
  18. private $user;
  19. /**
  20. * @since 18.0.0
  21. */
  22. public function __construct(IGroup $group, IUser $user) {
  23. parent::__construct();
  24. $this->group = $group;
  25. $this->user = $user;
  26. }
  27. /**
  28. * @return IGroup
  29. * @since 18.0.0
  30. */
  31. public function getGroup(): IGroup {
  32. return $this->group;
  33. }
  34. /**
  35. * @return IUser
  36. * @since 18.0.0
  37. */
  38. public function getUser(): IUser {
  39. return $this->user;
  40. }
  41. }