| 1 | <?php |
||
| 16 | class DirectBindingCommandHandlerLocator implements CommandHandlerLocator |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var CommandHandler[] |
||
| 20 | */ |
||
| 21 | private $handlers = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Bind command handler to concrete command by class name. |
||
| 25 | * |
||
| 26 | * @param string $command_name |
||
| 27 | * @param CommandHandler $handler |
||
| 28 | */ |
||
| 29 | 2 | public function registerHandler($command_name, CommandHandler $handler) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param Command $command |
||
| 36 | * |
||
| 37 | * @return CommandHandler|null |
||
| 38 | */ |
||
| 39 | 2 | public function findHandler(Command $command) |
|
| 45 | } |
||
| 46 |