| 1 | <?php |
||
| 13 | class RealtimeOutputHandler |
||
| 14 | { |
||
| 15 | protected $stdout; |
||
| 16 | protected $stderr; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Provide the output streams to use for stdout and stderr |
||
| 20 | */ |
||
| 21 | public function __construct(OutputInterface $stdout, OutputInterface $stderr) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * This gives us an opportunity to adapt to the settings of the |
||
| 29 | * process object (e.g. do we need to do anything differently if |
||
| 30 | * it is in tty mode, etc.) |
||
| 31 | */ |
||
| 32 | public function configure(Process $process) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Helper method when you want real-time output from a Process call. |
||
| 38 | * @param string $type |
||
| 39 | * @param string $buffer |
||
| 40 | */ |
||
| 41 | public function handleOutput($type, $buffer) |
||
| 49 | } |
||
| 50 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.