Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function load(array $configs, ContainerBuilder $container) |
||
17 | { |
||
18 | $configuration = new Configuration(); |
||
19 | $config = $this->processConfiguration($configuration, $configs); |
||
20 | |||
21 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||
22 | $loader->load('services.xml'); |
||
23 | $loader->load('twig.xml'); |
||
24 | $loader->load('console.xml'); |
||
25 | |||
26 | $factoryDef = $container->getDefinition('psi_description.factory'); |
||
27 | |||
28 | if ($config['schema']['enabled']) { |
||
29 | $factoryDef->replaceArgument(1, new Reference('psi_description.schema')); |
||
30 | } |
||
31 | |||
32 | $container->setParameter('psi_description.enhancers', $config['enhancers']); |
||
33 | $container->setParameter('psi_description.subject_resolvers', $config['subject_resolvers']); |
||
34 | $container->setParameter('psi_description.schema.extensions', $config['schema']['extensions']); |
||
35 | } |
||
36 | } |
||
37 |