| 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Process; |
| 4 | |
| 5 | interface InvokedProcess |
| 6 | { |
| 7 | /** |
| 8 | * Get the process ID if the process is still running. |
| 9 | * |
| 10 | * @return int|null |
| 11 | */ |
| 12 | public function id(); |
| 13 | |
| 14 | /** |
| 15 | * Send a signal to the process. |
| 16 | * |
| 17 | * @param int $signal |
| 18 | * @return $this |
| 19 | */ |
| 20 | public function signal(int $signal); |
| 21 | |
| 22 | /** |
| 23 | * Determine if the process is still running. |
| 24 | * |
| 25 | * @return bool |
| 26 | */ |
| 27 | public function running(); |
| 28 | |
| 29 | /** |
| 30 | * Get the standard output for the process. |
| 31 | * |
| 32 | * @return string |
| 33 | */ |
| 34 | public function output(); |
| 35 | |
| 36 | /** |
| 37 | * Get the error output for the process. |
| 38 | * |
| 39 | * @return string |
| 40 | */ |
| 41 | public function errorOutput(); |
| 42 | |
| 43 | /** |
| 44 | * Get the latest standard output for the process. |
| 45 | * |
| 46 | * @return string |
| 47 | */ |
| 48 | public function latestOutput(); |
| 49 | |
| 50 | /** |
| 51 | * Get the latest error output for the process. |
| 52 | * |
| 53 | * @return string |
| 54 | */ |
| 55 | public function latestErrorOutput(); |
| 56 | |
| 57 | /** |
| 58 | * Wait for the process to finish. |
| 59 | * |
| 60 | * @param callable|null $output |
| 61 | * @return \Illuminate\Process\ProcessResult |
| 62 | */ |
| 63 | public function wait(?callable $output = null); |
| 64 | |
| 65 | /** |
| 66 | * Wait until the given callback returns true. |
| 67 | * |
| 68 | * @param callable|null $output |
| 69 | * @return \Illuminate\Process\ProcessResult |
| 70 | */ |
| 71 | public function waitUntil(?callable $output = null); |
| 72 | } |