ShellCommandFailureException.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\Finder\Exception;
  11. @trigger_error('The '.__NAMESPACE__.'\ShellCommandFailureException class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
  12. use Symfony\Component\Finder\Adapter\AdapterInterface;
  13. use Symfony\Component\Finder\Shell\Command;
  14. /**
  15. * @author Jean-François Simon <contact@jfsimon.fr>
  16. *
  17. * @deprecated since 2.8, to be removed in 3.0.
  18. */
  19. class ShellCommandFailureException extends AdapterFailureException
  20. {
  21. private $command;
  22. public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null)
  23. {
  24. $this->command = $command;
  25. parent::__construct($adapter, 'Shell command failed: "'.$command->join().'".', $previous);
  26. }
  27. /**
  28. * @return Command
  29. */
  30. public function getCommand()
  31. {
  32. return $this->command;
  33. }
  34. }