1 | <?php |
||
9 | class ExecuteProgram extends ActionAbstract |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $description; |
||
15 | |||
16 | protected $command; |
||
17 | protected $breakOnFailure; |
||
18 | protected $environment; |
||
19 | protected $currentDir; |
||
20 | protected $timeout; |
||
21 | |||
22 | /** |
||
23 | * Executes an external program. |
||
24 | * |
||
25 | * @param string $description Description of the intention of the program |
||
26 | * @param string $command Program command line (with parameters) |
||
27 | * @param bool $breakOnFailure (Optional, default is true) Stop execution if program returns non-0 exit code |
||
28 | * @param array|null $environment (Optional, default is null / current vars) Environment variables to pass to program |
||
29 | * @param string|null $currentDir The current directory to use for program |
||
30 | * @param int $timeout (Optional, default is 60) The time to wait for program to finish (in seconds) |
||
31 | */ |
||
32 | 2 | public function __construct($description, $command, $breakOnFailure = true, $environment = null, $currentDir = null, $timeout = 60) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 1 | public function getName() |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function isSupported() |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 2 | public function execute(InputInterface $input, OutputInterface $output) |
|
77 | } |
||
78 |