NodeAddedToFavorite.php 746 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 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. * @since 28.0.0
  12. */
  13. class NodeAddedToFavorite extends Event {
  14. /**
  15. * @since 28.0.0
  16. */
  17. public function __construct(
  18. protected IUser $user,
  19. protected int $fileId,
  20. protected string $path,
  21. ) {
  22. parent::__construct();
  23. }
  24. /**
  25. * @since 28.0.0
  26. */
  27. public function getUser(): IUser {
  28. return $this->user;
  29. }
  30. /**
  31. * @since 28.0.0
  32. */
  33. public function getFileId(): int {
  34. return $this->fileId;
  35. }
  36. /**
  37. * @since 28.0.0
  38. */
  39. public function getPath(): string {
  40. return $this->path;
  41. }
  42. }