NotSupportedException.php 804 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace League\Flysystem;
  3. use RuntimeException;
  4. use SplFileInfo;
  5. class NotSupportedException extends RuntimeException implements FilesystemException
  6. {
  7. /**
  8. * Create a new exception for a link.
  9. *
  10. * @param SplFileInfo $file
  11. *
  12. * @return static
  13. */
  14. public static function forLink(SplFileInfo $file)
  15. {
  16. $message = 'Links are not supported, encountered link at ';
  17. return new static($message . $file->getPathname());
  18. }
  19. /**
  20. * Create a new exception for a link.
  21. *
  22. * @param string $systemType
  23. *
  24. * @return static
  25. */
  26. public static function forFtpSystemType($systemType)
  27. {
  28. $message = "The FTP system type '$systemType' is currently not supported.";
  29. return new static($message);
  30. }
  31. }