1 | <?php |
||
25 | class ProcOpen implements Processor |
||
26 | { |
||
27 | /** |
||
28 | * Handles the output of stdOut |
||
29 | * |
||
30 | * @var \SebastianFeldmann\Cli\Output |
||
31 | */ |
||
32 | private $stdOutOutput; |
||
33 | |||
34 | /** |
||
35 | * Handles the Output of stdErr |
||
36 | * |
||
37 | * @var \SebastianFeldmann\Cli\Output |
||
38 | */ |
||
39 | private $stdErrOutput; |
||
40 | |||
41 | /** |
||
42 | * ProcOpen constructor |
||
43 | * |
||
44 | * @param \SebastianFeldmann\Cli\Output $stdOut |
||
45 | * @param \SebastianFeldmann\Cli\Output $stdErr |
||
46 | */ |
||
47 | 3 | public function __construct(Output $stdOut = null, Output $stdErr = null) |
|
52 | |||
53 | /** |
||
54 | * Execute the command |
||
55 | * |
||
56 | * @param string $cmd |
||
57 | * @param int[] $acceptableExitCodes |
||
58 | * @return \SebastianFeldmann\Cli\Command\Result |
||
59 | */ |
||
60 | 3 | public function run(string $cmd, array $acceptableExitCodes = [0]) : Result |
|
93 | |||
94 | /** |
||
95 | * Uses the output handlers to process the given stdOut and stdErr output |
||
96 | * |
||
97 | * @param string $stdOut |
||
98 | * @param string $stdErr |
||
99 | * @return void |
||
100 | */ |
||
101 | 3 | private function handleOutput(string $stdOut, string $stdErr) : void |
|
106 | } |
||
107 |