| 1 | <?php |
||
| 11 | class CommandBusMiddleware implements CommandBusMiddlewareInterface |
||
| 12 | { |
||
| 13 | /** @var CommandTranslator */ |
||
| 14 | protected $commandTranslator; |
||
| 15 | |||
| 16 | /** @var CommandHandlerResolver */ |
||
| 17 | protected $handlerResolver; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param CommandTranslator $commandTranslator |
||
| 21 | * @param CommandHandlerResolver $handlerResolver |
||
| 22 | */ |
||
| 23 | public function __construct(CommandTranslator $commandTranslator, CommandHandlerResolver $handlerResolver) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Command $command |
||
| 31 | * @param callable|null $next |
||
| 32 | */ |
||
| 33 | public function __invoke(Command $command, callable $next = null) |
||
| 45 | } |
||
| 46 |