IOException.php 938 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Filesystem\Exception;
  11. /**
  12. * Exception class thrown when a filesystem operation failure happens.
  13. *
  14. * @author Romain Neutron <imprec@gmail.com>
  15. * @author Christian Gärtner <christiangaertner.film@googlemail.com>
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. */
  18. class IOException extends \RuntimeException implements IOExceptionInterface
  19. {
  20. private $path;
  21. public function __construct($message, $code = 0, \Exception $previous = null, $path = null)
  22. {
  23. $this->path = $path;
  24. parent::__construct($message, $code, $previous);
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function getPath()
  30. {
  31. return $this->path;
  32. }
  33. }