InvalidateMountCacheEvent.php 720 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Files\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IUser;
  10. /**
  11. * Used to notify the filesystem setup manager that the available mounts for a user have changed
  12. *
  13. * @since 24.0.0
  14. */
  15. class InvalidateMountCacheEvent extends Event {
  16. private ?IUser $user;
  17. /**
  18. * @param IUser|null $user user
  19. *
  20. * @since 24.0.0
  21. */
  22. public function __construct(?IUser $user) {
  23. parent::__construct();
  24. $this->user = $user;
  25. }
  26. /**
  27. * @return IUser|null user
  28. *
  29. * @since 24.0.0
  30. */
  31. public function getUser(): ?IUser {
  32. return $this->user;
  33. }
  34. }