Bukashk0zzzLiipImagineSerializationExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 14 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the Bukashk0zzzLiipImagineSerializationBundle
4
 *
5
 * (c) Denis Golubovskiy <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Bukashk0zzz\LiipImagineSerializationBundle\DependencyInjection;
12
13
use Symfony\Component\Config\FileLocator;
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
16
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17
18
/**
19
 * This is the class that loads and manages Bukashk0zzzLiipImagineSerializationBundle configuration
20
 */
21
class Bukashk0zzzLiipImagineSerializationExtension extends Extension
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function load(array $configs, ContainerBuilder $container)
27
    {
28
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
29
        $loader->load('services.yml');
30
31
        $configuration = new Configuration();
32
        $config = $this->processConfiguration($configuration, $configs);
33
34
        $container->getDefinition('bukashk0zzz_liip_imagine_pre_serialization.listener')
35
            ->addArgument($config);
36
37
        $container->getDefinition('bukashk0zzz_liip_imagine_post_serialization.listener')
38
            ->addArgument($config);
39
    }
40
}
41