| 1 | <?php |
||
| 17 | class ContainerCommandHandlerLocator implements CommandHandlerLocator |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var ContainerInterface |
||
| 21 | */ |
||
| 22 | private $container; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string[] |
||
| 26 | */ |
||
| 27 | private $command_handler_ids = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param ContainerInterface $container |
||
| 31 | */ |
||
| 32 | 3 | public function __construct(ContainerInterface $container) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param Command $command |
||
| 39 | * |
||
| 40 | * @return CommandHandler|null |
||
| 41 | */ |
||
| 42 | 3 | public function getCommandHandler(Command $command) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $command_name |
||
| 49 | * @param string $service |
||
| 50 | */ |
||
| 51 | 3 | public function registerService($command_name, $service) |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @param $command_name |
||
| 58 | * |
||
| 59 | * @return CommandHandler |
||
| 60 | */ |
||
| 61 | 3 | private function lazyLoad($command_name) |
|
| 73 | } |
||
| 74 |