Completed
Push — master ( 6d5669...ad217e )
by Daniel
04:41
created

NarratorExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 16
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
1
<?php
2
/**
3
 * @package narrator-bundle
4
 */
5
6
namespace Mleko\Narrator\Bundle\DependencyInjection;
7
8
use Mleko\Narrator\Bundle\DependencyInjection\Configuration\EventBusConfiguration;
9
use Symfony\Component\Config\FileLocator;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
use Symfony\Component\DependencyInjection\Loader;
12
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
13
14
/**
15
 * This is the class that loads and manages your bundle configuration
16
 *
17
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
18
 */
19
class NarratorExtension extends Extension
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24 3
    public function load(array $configs, ContainerBuilder $container)
25
    {
26 3
        $configuration = new Configuration();
27 3
        $config = $this->processConfiguration($configuration, $configs);
28
29 3
        (new EventBusConfiguration())->configureEventBus($config['event_bus'], $container);
30
31 3
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
32 3
        $loader->load('services.xml');
33 3
    }
34
}
35