Completed
Push — master ( 6b7dcc...b3fe52 )
by Alexey
11:45
created

WowAppsSlackExtension::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
/**
3
 * This file is part of the WoW-Apps/Symfony-Slack-Bot bundle for Symfony 3
4
 * https://github.com/wow-apps/symfony-slack-bot
5
 *
6
 * (c) 2016 WoW-Apps
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 WowApps\SlackBundle\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17
use Symfony\Component\DependencyInjection\Loader;
18
19
/**
20
 * Class WowAppsSlackExtension
21
 *
22
 * @author Alexey Samara <[email protected]>
23
 * @package WowApps\SlackBundle
24
 */
25
class WowAppsSlackExtension extends Extension
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function load(array $configs, ContainerBuilder $container)
31
    {
32
        $configuration = new Configuration();
33
        $config = $this->processConfiguration($configuration, $configs);
34
35
        $container->setParameter('wowapps.slackbot.config', $config);
36
37
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
38
        $loader->load('services.yml');
39
    }
40
}
41