1
0

NodeAddedToCache.php 856 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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\Files\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\Files\Storage\IStorage;
  10. /**
  11. * @since 18.0.0
  12. */
  13. class NodeAddedToCache extends Event {
  14. /** @var IStorage */
  15. private $storage;
  16. /** @var string */
  17. private $path;
  18. /**
  19. * @param IStorage $storage
  20. * @param string $path
  21. * @since 18.0.0
  22. */
  23. public function __construct(IStorage $storage,
  24. string $path) {
  25. parent::__construct();
  26. $this->storage = $storage;
  27. $this->path = $path;
  28. }
  29. /**
  30. * @return IStorage
  31. * @since 18.0.0
  32. */
  33. public function getStorage(): IStorage {
  34. return $this->storage;
  35. }
  36. /**
  37. * @return string
  38. * @since 18.0.0
  39. */
  40. public function getPath(): string {
  41. return $this->path;
  42. }
  43. }