Completed
Push — master ( 3fc573...634850 )
by WEBEWEB
11:27
created

WBWJQueryQueryBuilderExtension::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the jquery-querybuilder-bundle package.
5
 *
6
 * (c) 2017 WEBEWEB
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 WBW\Bundle\JQuery\QueryBuilderBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
18
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
19
20
/**
21
 * jQuery QueryBuilder extension.
22
 *
23
 * @author webeweb <https://github.com/webeweb/>
24
 * @package WBW\Bundle\JQuery\QueryBuilderBundle\DependencyInjection
25
 */
26
class WBWJQueryQueryBuilderExtension extends Extension {
27
28
    /**
29
     * Extension alias.
30
     *
31
     * @var string
32
     */
33
    const EXTENSION_ALIAS = "wbw_jquery_querybuilder";
34
35
    /**
36
     * {@inheritDoc}
37
     */
38
    public function getAlias() {
39
        return self::EXTENSION_ALIAS;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function load(array $configs, ContainerBuilder $container) {
46
47
        $fileLocator = new FileLocator(__DIR__ . "/../Resources/config");
48
49
        $serviceLoader = new YamlFileLoader($container, $fileLocator);
50
        $serviceLoader->load("services.yml");
51
52
        /** @var ConfigurationInterface $configuration */
53
        $configuration = $this->getConfiguration($configs, $container);
54
55
        $config = $this->processConfiguration($configuration, $configs);
56
    }
57
}
58