| 1 | <?php declare(strict_types=1); |
||
| 9 | final class Client |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var ContainerInterface |
||
| 13 | */ |
||
| 14 | private $container; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var CommandBus |
||
| 18 | */ |
||
| 19 | private $commandBus; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param ContainerInterface $container |
||
| 23 | */ |
||
| 24 | public function __construct(ContainerInterface $container) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return ContainerInterface |
||
| 32 | */ |
||
| 33 | public function getContainer(): ContainerInterface |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function getFromContainer(string $id) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param $command |
||
| 48 | * @return CancellablePromiseInterface |
||
| 49 | */ |
||
| 50 | public function handle($command): CancellablePromiseInterface |
||
| 54 | } |
||
| 55 |