Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function execute($input = null) |
||
33 | { |
||
34 | if (!is_string($input)) { |
||
35 | throw new ExecutableException( |
||
36 | 'input must be a string' |
||
37 | ); |
||
38 | } |
||
39 | |||
40 | if (!file_exists($input)) { |
||
41 | throw new ExecutableException( |
||
42 | 'file "' . $input . '" does not exist' |
||
43 | ); |
||
44 | } |
||
45 | |||
46 | $command = $this->command; |
||
47 | //no command validation because of the fact that the zf2 application |
||
48 | // is setting an exit code greater 0 since noting was executed |
||
49 | $output = $command->execute('/usr/bin/env php ' . $input, false); |
||
50 | |||
51 | return $output; |
||
52 | } |
||
53 | } |