SymbolicLinkEncountered.php 559 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. namespace League\Flysystem;
  4. use RuntimeException;
  5. final class SymbolicLinkEncountered 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 $pathName): SymbolicLinkEncountered
  16. {
  17. $e = new static("Unsupported symbolic link encountered at location $pathName");
  18. $e->location = $pathName;
  19. return $e;
  20. }
  21. }