Version 1
[yaffs-website] / vendor / symfony / finder / Exception / ShellCommandFailureException.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Finder\Exception;
13
14 @trigger_error('The '.__NAMESPACE__.'\ShellCommandFailureException class is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
15
16 use Symfony\Component\Finder\Adapter\AdapterInterface;
17 use Symfony\Component\Finder\Shell\Command;
18
19 /**
20  * @author Jean-François Simon <contact@jfsimon.fr>
21  *
22  * @deprecated since 2.8, to be removed in 3.0.
23  */
24 class ShellCommandFailureException extends AdapterFailureException
25 {
26     /**
27      * @var Command
28      */
29     private $command;
30
31     /**
32      * @param AdapterInterface $adapter
33      * @param Command          $command
34      * @param \Exception|null  $previous
35      */
36     public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null)
37     {
38         $this->command = $command;
39         parent::__construct($adapter, 'Shell command failed: "'.$command->join().'".', $previous);
40     }
41
42     /**
43      * @return Command
44      */
45     public function getCommand()
46     {
47         return $this->command;
48     }
49 }