Completed
Push — feature/evo-2472-whoami ( aca89f...28fd37 )
by Jan
21:32 queued 10:36
created

GravitonCoreExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 23
rs 10
ccs 2
cts 2
cp 1

2 Methods

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