| 1 | <?php declare(strict_types=1); |
||
| 11 | abstract class AbstractResource implements ResourceInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var LoopInterface |
||
| 15 | */ |
||
| 16 | private $loop; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var CommandBus |
||
| 20 | */ |
||
| 21 | private $commandBus; |
||
| 22 | 4 | ||
| 23 | public function __construct(LoopInterface $loop, CommandBus $commandBus) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param $command |
||
| 31 | * @return CancellablePromiseInterface |
||
| 32 | */ |
||
| 33 | protected function handleCommand($command): CancellablePromiseInterface |
||
| 37 | |||
| 38 | 1 | protected function wait(PromiseInterface $promise) |
|
| 42 | } |
||
| 43 |