As3ModlrExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
3
namespace As3\Bundle\ModlrBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
10
/**
11
 * Loads and manages the bundle configuration for Modlr.
12
 *
13
 * @author  Jacob Bare <[email protected]>
14
 */
15
class As3ModlrExtension extends Extension
16
{
17
    /**
18
     * {@inheritDoc}
19
     */
20
    public function load(array $configs, ContainerBuilder $container)
21
    {
22
        // Process the config.
23
        $config = $this->processConfiguration(new Configuration(), $configs);
24
25
        // Load bundle services.
26
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
27
        $loader->load('services.yml');
28
29
        $serviceLoader = new ServiceLoaderManager($container);
30
        $serviceLoader->loadServices($config);
31
    }
32
}
33