| 1 | <?php |
||
| 11 | class ContainerLocator implements HandlerLocator |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var ContainerInterface |
||
| 15 | */ |
||
| 16 | private $container; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param ContainerInterface $container A PSR-11 container holding command handlers |
||
| 20 | * mapped by command names |
||
| 21 | */ |
||
| 22 | 2 | public function __construct(ContainerInterface $container) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Gets the handler for a specified command. |
||
| 29 | * |
||
| 30 | * @param string $commandName |
||
| 31 | * |
||
| 32 | * @return object The command handler service |
||
| 33 | * |
||
| 34 | * @throws MissingHandlerException |
||
| 35 | */ |
||
| 36 | 2 | public function getHandlerForCommand($commandName) |
|
| 44 | } |
||
| 45 |