| 1 | <?php |
||
| 8 | class CommandBus extends \yii\base\Component |
||
| 9 | { |
||
| 10 | public $extractor; |
||
| 11 | public $locator; |
||
| 12 | public $inflector; |
||
| 13 | public $middlewares = []; |
||
| 14 | |||
| 15 | protected $bus; |
||
| 16 | |||
| 17 | protected function buildTactician() |
||
| 29 | |||
| 30 | public function getLocator() |
||
| 38 | |||
| 39 | public function registerHandler($middleware) |
||
| 44 | |||
| 45 | |||
| 46 | public function handle($command) |
||
| 50 | |||
| 51 | public function getTactician() |
||
| 59 | } |
||
| 60 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: