Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function load(array $config, ContainerBuilder $container) |
||
16 | { |
||
17 | $processor = new Processor(); |
||
18 | $config = $processor->processConfiguration(new Configuration(), $config); |
||
19 | |||
20 | $container->setParameter( |
||
21 | 'surfnet_yubikey_api_client.credentials.client_id', |
||
22 | (string) $config['credentials']['client_id'] |
||
23 | ); |
||
24 | $container->setParameter( |
||
25 | 'surfnet_yubikey_api_client.credentials.client_secret', |
||
26 | $config['credentials']['client_secret'] |
||
27 | ); |
||
28 | |||
29 | $loader = new YamlFileLoader( |
||
30 | $container, |
||
31 | new FileLocator(__DIR__ . '/../Resources/config') |
||
32 | ); |
||
33 | $loader->load('services.yml'); |
||
34 | |||
35 | //check for test environment |
||
36 | if ($container->getParameter('kernel.environment') === 'test') { |
||
37 | $loader->load('services_test.yml'); |
||
38 | } |
||
41 |