1 | <?php |
||
21 | trait ProcessTrait |
||
22 | { |
||
23 | use BuilderTrait; |
||
24 | |||
25 | /** |
||
26 | * @param string $commandline The command line to run |
||
27 | * @param string|null $cwd The working directory or null to use the working dir of the current PHP |
||
28 | * process |
||
29 | * @param array|null $env The environment variables or null to inherit |
||
30 | * @param string|null $input The input |
||
31 | * @param int|float|null $timeout The timeout in seconds or null to disable |
||
32 | * @param array $options An array of options for proc_open |
||
33 | * |
||
34 | * @return Process |
||
35 | * @throws RuntimeException When proc_open is not installed |
||
36 | */ |
||
37 | 65 | public function getProcess( |
|
48 | |||
49 | /** |
||
50 | * Abstract Log function that might should be handed by the OptionalLoggerTrait or similar |
||
51 | * |
||
52 | * @param string $level |
||
53 | * @param string $message |
||
54 | * @param array $context |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | abstract protected function log($level, $message, array $context = []); |
||
59 | } |
||
60 |