OmnideskExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
namespace OmnideskBundle\DependencyInjection;
3
4
use Symfony\Component\Config\FileLocator;
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\DependencyInjection\Extension\Extension;
7
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
8
9
/**
10
 * Class OmnideskExtension
11
 * @package OmnideskBundle\DependencyInjection
12
 */
13
class OmnideskExtension extends Extension
14
{
15
    /**
16
     * @param array            $configs
17
     * @param ContainerBuilder $container
18
     */
19
    public function load(array $configs, ContainerBuilder $container)
20
    {
21
        $configuration = new Configuration();
22
        $config = $this->processConfiguration($configuration, $configs);
23
24
        $container->setParameter('omnidesk', $config);
25
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26
        $loader->load('services.yml');
27
    }
28
}
29