1 | <?php declare(strict_types=1); |
||
14 | final class Client implements ClientInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | private $container; |
||
20 | |||
21 | /** |
||
22 | * @var CommandBusInterface |
||
23 | */ |
||
24 | private $commandBus; |
||
25 | |||
26 | /** |
||
27 | * @param ContainerInterface $container |
||
28 | */ |
||
29 | public function __construct(ContainerInterface $container) |
||
34 | |||
35 | /** |
||
36 | * @return ContainerInterface |
||
37 | */ |
||
38 | public function getContainer(): ContainerInterface |
||
42 | |||
43 | /** |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function getFromContainer(string $id) |
||
50 | |||
51 | /** |
||
52 | * @param $command |
||
53 | * @return CancellablePromiseInterface |
||
54 | */ |
||
55 | public function handle($command): CancellablePromiseInterface |
||
59 | |||
60 | public function hydrate(string $resource): CancellablePromiseInterface |
||
75 | |||
76 | public function extract(ResourceInterface $resource): CancellablePromiseInterface |
||
88 | } |
||
89 |