| 1 | <?php |
||
| 14 | class ContainerCommandHandlerMapper implements CommandHandlerMapper |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Карта методов вызова |
||
| 18 | * [messageName => [service => '...', 'method' => '...']] |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | private $callableMap = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var ContainerInterface |
||
| 26 | */ |
||
| 27 | private $container; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * HandlerMapper constructor. |
||
| 31 | * |
||
| 32 | * @param ContainerInterface $container |
||
| 33 | * @param array $callableMap |
||
| 34 | */ |
||
| 35 | public function __construct(ContainerInterface $container, array $callableMap) |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * @param $commandName |
||
| 44 | * |
||
| 45 | * @return callable |
||
| 46 | * @throws HandlerNotFoundException|ServiceNotFoundException|ServiceCircularReferenceException |
||
| 47 | */ |
||
| 48 | public function get($commandName) |
||
| 66 | } |
||
| 67 |