Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function load(array $configs, ContainerBuilder $container): void |
||
20 | { |
||
21 | $configuration = new Configuration(); |
||
22 | $config = $this->processConfiguration($configuration, $configs); |
||
23 | |||
24 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||
25 | $loader->load('services.xml'); |
||
26 | |||
27 | if ($config['api_host'] && 0 !== strncmp($config['api_host'], 'https', 5)) { |
||
28 | $config['api_host'] = 'https://'.$config['api_host']; |
||
29 | } |
||
30 | |||
31 | $container->setParameter('sendy.api_key', $config['api_key']); |
||
32 | $container->setParameter('sendy.api_host', trim($config['api_host'], '/')); |
||
33 | $container->setParameter('sendy.list_id', $config['list_id']); |
||
34 | } |
||
36 |