Completed
Pull Request — master (#3)
by Jacob
02:35
created

As3ModlrExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 12 1
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\Definition;
8
use Symfony\Component\DependencyInjection\Loader;
9
use Symfony\Component\DependencyInjection\Reference;
10
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
11
12
/**
13
 * Loads and manages the bundle configuration for Modlr.
14
 *
15
 * @author  Jacob Bare <[email protected]>
16
 */
17
class As3ModlrExtension extends Extension
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function load(array $configs, ContainerBuilder $container)
23
    {
24
        // Process the config.
25
        $config = $this->processConfiguration(new Configuration(), $configs);
26
27
        // Load bundle services.
28
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
29
        $loader->load('services.yml');
30
31
        $serviceLoader = new ServiceLoaderManager($container);
32
        $serviceLoader->loadServices($config);
33
    }
34
}
35