FileNotFoundException.php 691 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace League\Flysystem;
  3. use Exception as BaseException;
  4. class FileNotFoundException extends Exception
  5. {
  6. /**
  7. * @var string
  8. */
  9. protected $path;
  10. /**
  11. * Constructor.
  12. *
  13. * @param string $path
  14. * @param int $code
  15. * @param \Exception $previous
  16. */
  17. public function __construct($path, $code = 0, BaseException $previous = null)
  18. {
  19. $this->path = $path;
  20. parent::__construct('File not found at path: ' . $this->getPath(), $code, $previous);
  21. }
  22. /**
  23. * Get the path which was not found.
  24. *
  25. * @return string
  26. */
  27. public function getPath()
  28. {
  29. return $this->path;
  30. }
  31. }