| 1 | <?php |
||
| 12 | class ContainerBasedHandlerLocator implements HandlerLocator |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var ContainerInterface |
||
| 16 | */ |
||
| 17 | private $container; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | private $commandToServiceId = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param ContainerInterface $container |
||
| 26 | * @param array $commandToServiceIdMapping |
||
| 27 | */ |
||
| 28 | 6 | public function __construct(ContainerInterface $container, array $commandToServiceIdMapping) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Retrieves the handler for a specified command |
||
| 36 | * |
||
| 37 | * @param string $commandName |
||
| 38 | * @return object |
||
| 39 | * |
||
| 40 | * @throws MissingHandlerException |
||
| 41 | */ |
||
| 42 | 6 | public function getHandlerForCommand($commandName) |
|
| 50 | } |
||
| 51 |