TensideCoreExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
/**
4
 * This file is part of tenside/core-bundle.
5
 *
6
 * (c) Christian Schiffler <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * This project is provided in good faith and hope to be usable by anyone.
12
 *
13
 * @package    tenside/core-bundle
14
 * @author     Christian Schiffler <[email protected]>
15
 * @copyright  2015 Christian Schiffler <[email protected]>
16
 * @license    https://github.com/tenside/core-bundle/blob/master/LICENSE MIT
17
 * @link       https://github.com/tenside/core-bundle
18
 * @filesource
19
 */
20
21
namespace Tenside\CoreBundle\DependencyInjection;
22
23
use Symfony\Component\Config\FileLocator;
24
use Symfony\Component\DependencyInjection\ContainerBuilder;
25
use Symfony\Component\DependencyInjection\Extension\Extension;
26
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
27
28
/**
29
 * This class provides loading of the tenside core configuration.
30
 */
31
class TensideCoreExtension extends Extension
32
{
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function getAlias()
37
    {
38
        return 'tenside-core';
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function load(array $mergedConfig, ContainerBuilder $container)
45
    {
46
        $loader = new YamlFileLoader(
47
            $container,
48
            new FileLocator(__DIR__ . '/../Resources/config')
49
        );
50
51
        $loader->load('services.yml');
52
    }
53
}
54