1 | <?php declare(strict_types=1); |
||
12 | final class CommandBus implements CommandBusInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var Tactician |
||
16 | */ |
||
17 | private $commandBus; |
||
18 | |||
19 | /** |
||
20 | * @var LoopInterface |
||
21 | */ |
||
22 | private $loop; |
||
23 | |||
24 | /** |
||
25 | * @param LoopInterface $loop |
||
26 | * @param CommandHandlerMiddleware $commandHandlerMiddleware |
||
27 | */ |
||
28 | 2 | public function __construct(LoopInterface $loop, CommandHandlerMiddleware $commandHandlerMiddleware) |
|
35 | |||
36 | /** |
||
37 | * Executes the given command and optionally returns a value. |
||
38 | * |
||
39 | * @param object $command |
||
40 | * |
||
41 | * @return CancellablePromiseInterface |
||
42 | */ |
||
43 | 1 | public function handle($command): CancellablePromiseInterface |
|
49 | } |
||
50 |