1 | <?php |
||
12 | final class Req2CmdExtension extends Extension |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | * @throws \Exception |
||
17 | */ |
||
18 | public function load(array $configs, ContainerBuilder $container): void |
||
19 | { |
||
20 | $configuration = new Req2CmdConfiguration(); |
||
21 | $config = $this->processConfiguration($configuration, $configs); |
||
22 | |||
23 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
||
24 | |||
25 | $loader->load('actions.xml'); |
||
26 | $loader->load('extractors.xml'); |
||
27 | $loader->load('listeners.xml'); |
||
28 | $loader->load('param_mappers.xml'); |
||
29 | $loader->load('command_bus.xml'); |
||
30 | |||
31 | $this->configureExtractors($config, $container); |
||
32 | $this->configureCommandBus($config, $container); |
||
33 | $this->configureEventListeners($config, $container); |
||
34 | } |
||
35 | |||
36 | public function getAlias(): string |
||
40 | |||
41 | private function configureExtractors(array $config, ContainerBuilder $container): void |
||
46 | |||
47 | private function configureCommandBus(array $config, ContainerBuilder $container): void |
||
59 | |||
60 | private function configureEventListeners(array $config, ContainerBuilder $container): void |
||
73 | |||
74 | private function configureEventListener(ContainerBuilder $container, string $listenerId, array $listenerCfg): void |
||
88 | |||
89 | private function getListenerSvcIdByAlias(string $alias): string |
||
97 | } |
||
98 |