UnreadableFileEncountered.php 556 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. namespace League\Flysystem;
  4. use RuntimeException;
  5. final class UnreadableFileEncountered extends RuntimeException implements FilesystemException
  6. {
  7. /**
  8. * @var string
  9. */
  10. private $location;
  11. public function location(): string
  12. {
  13. return $this->location;
  14. }
  15. public static function atLocation(string $location): UnreadableFileEncountered
  16. {
  17. $e = new static("Unreadable file encountered at location {$location}.");
  18. $e->location = $location;
  19. return $e;
  20. }
  21. }