Drupal investigation

ShellCommandFailureException.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 version 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. /**
  22. * @var Command
  23. */
  24. private $command;
  25. /**
  26. * @param AdapterInterface $adapter
  27. * @param Command $command
  28. * @param \Exception|null $previous
  29. */
  30. public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null)
  31. {
  32. $this->command = $command;
  33. parent::__construct($adapter, 'Shell command failed: "'.$command->join().'".', $previous);
  34. }
  35. /**
  36. * @return Command
  37. */
  38. public function getCommand()
  39. {
  40. return $this->command;
  41. }
  42. }