BCRMWebExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 17
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 11 1
1
<?php
2
3
/**
4
 * @author    Markus Tacker <[email protected]>
5
 * @copyright 2013-2016 Verein zur Förderung der Netzkultur im Rhein-Main-Gebiet e.V. | http://netzkultur-rheinmain.de/
6
 */
7
8
namespace BCRM\WebBundle\DependencyInjection;
9
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
use Symfony\Component\Config\FileLocator;
12
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
13
use Symfony\Component\DependencyInjection\Loader;
14
15
/**
16
 * This is the class that loads and manages the bundle configuration.
17
 */
18
class BCRMWebExtension extends Extension
19
{
20
    /**
21
     * {@inheritDoc}
22
     */
23
    public function load(array $configs, ContainerBuilder $container)
24
    {
25
        $configuration = new Configuration();
26
        $config        = $this->processConfiguration($configuration, $configs);
27
        $container->setParameter('bcrm_web.content_dir', $config['content_dir']);
28
        $container->setParameter('bcrm_web.content_path', $config['content_path']);
29
30
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
31
        $loader->load('controllers.xml');
32
        $loader->load('services.xml');
33
    }
34
}
35