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

GravitonProxyExtension::getConfigDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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