| 1 | <?php |
||
| 9 | class SynchronousProcess implements Runnable |
||
| 10 | { |
||
| 11 | protected $id; |
||
| 12 | |||
| 13 | protected $task; |
||
| 14 | |||
| 15 | protected $output; |
||
| 16 | protected $errorOutput; |
||
| 17 | protected $executionTime; |
||
| 18 | |||
| 19 | use ProcessCallbacks; |
||
| 20 | |||
| 21 | public function __construct(callable $task, int $id) |
||
| 26 | |||
| 27 | public static function create(callable $task, int $id): self |
||
| 31 | |||
| 32 | public function getId(): int |
||
| 36 | |||
| 37 | public function getPid(): ?int |
||
| 41 | |||
| 42 | public function start() |
||
| 56 | |||
| 57 | public function stop() |
||
| 60 | |||
| 61 | public function getOutput() |
||
| 65 | |||
| 66 | public function getErrorOutput() |
||
| 70 | |||
| 71 | public function getCurrentExecutionTime(): float |
||
| 75 | |||
| 76 | protected function resolveErrorOutput(): Throwable |
||
| 80 | |||
| 81 | public function withBinary(string $binary = Pool::DEFAULT_PHP_BINARY): self |
||
| 85 | } |
||
| 86 |