Passed
Push — master ( 745178...3deda8 )
by Alexey
03:44
created

WowAppsProxybonanzaExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
1
<?php
2
/**
3
 * This file is part of the wow-apps/symfony-proxybonanza project
4
 * https://github.com/wow-apps/symfony-proxybonanza
5
 *
6
 * (c) 2016 WoW-Apps
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WowApps\ProxybonanzaBundle\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17
use Symfony\Component\DependencyInjection\Loader;
18
19
/**
20
 * Class WowAppsProxybonanzaExtension
21
 * @author Alexey Samara <[email protected]>
22
 * @package wow-apps/symfony-proxybonanza
23
 */
24
class WowAppsProxybonanzaExtension extends Extension
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function load(array $configs, ContainerBuilder $container)
30
    {
31
        $configuration = new Configuration();
32
        $config = $this->processConfiguration($configuration, $configs);
33
34
        $container->setParameter('wowapps.proxybonanza.config', $config);
35
36
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
37
        $loader->load('repositories.yaml');
38
        $loader->load('services.yaml');
39
    }
40
}
41