TimegrydOpcacheResetExtension::load()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 2
1
<?php
2
3
namespace Timegryd\OpcacheResetBundle\DependencyInjection;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\Config\FileLocator;
7
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8
use Symfony\Component\DependencyInjection\Loader;
9
10
class TimegrydOpcacheResetExtension extends Extension
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function load(array $configs, ContainerBuilder $container)
16
    {
17
        $configuration = new Configuration();
18
        $processConfig = $this->processConfiguration($configuration, $configs);
19
20
        foreach ($processConfig as $key => $value) {
21
            $container->setParameter($this->getAlias().'.'.$key, $value);
22
        }
23
24
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
25
        $loader->load('services.yml');
26
    }
27
}
28