Completed
Pull Request — develop (#273)
by Samuel
23:34 queued 09:33
created

GravitonProxyExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 29
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigDir() 0 4 1
A load() 0 8 1
1
<?php
2
/**
3
 * ProxyBundle configuration
4
 */
5
6
namespace Graviton\ProxyBundle\DependencyInjection;
7
8
use Graviton\BundleBundle\DependencyInjection\GravitonBundleExtension;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
11
/**
12
 * This is the class that loads and manages your bundle configuration
13
 *
14
 * To learn more see {@link http://scm.to/004w}
15
 *
16
 * @author  List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
17
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
18
 * @link    http://swisscom.ch
19
 */
20
class GravitonProxyExtension extends GravitonBundleExtension
21
{
22
    /**
23
     * {@inheritDoc}
24
     *
25
     * @return string
26
     */
27 1
    public function getConfigDir()
28
    {
29 1
        return __DIR__.'/../Resources/config';
30
    }
31
32
    /**
33
     * Loads current configuration.
34
     *
35
     * @param array            $configs   Set of configuration options
36
     * @param ContainerBuilder $container Instance of the SF2 container
37
     *
38
     * @return void
39
     */
40 1
    public function load(array $configs, ContainerBuilder $container)
41
    {
42 1
        parent::load($configs, $container);
43
44 1
        $configs = $this->processConfiguration(new Configuration(), $configs);
45
46 1
        $container->setParameter('graviton.proxy.sources', $configs['sources']);
47 1
    }
48
}
49