1 | <?php |
||
10 | class TacticianCommandBus extends \yii\base\Component implements CommandBusInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var Middleware[] |
||
14 | */ |
||
15 | protected $middlewares = []; |
||
16 | |||
17 | /** |
||
18 | * @var Middleware |
||
19 | */ |
||
20 | protected $defaultHandler; |
||
21 | |||
22 | /** |
||
23 | * @var CommandBus |
||
24 | */ |
||
25 | protected $realCommandBus; |
||
26 | |||
27 | public function __construct(Middleware $defaultHandler, array $config = []) |
||
34 | |||
35 | public function handle($command) |
||
39 | |||
40 | public function getMiddlewares() |
||
46 | |||
47 | protected function prepareMiddlewares($middlewares) |
||
61 | |||
62 | public function setMiddlewares($middlewares) |
||
66 | |||
67 | protected function containsHandler($middlewares) |
||
77 | } |
||
78 |