MewesKTwigExcelExtension::loadInternal()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
namespace MewesK\TwigExcelBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
9
10
/**
11
 * Class MewesKTwigExcelExtension
12
 *
13
 * @package MewesK\TwigExcelBundle\DependencyInjection
14
 */
15
class MewesKTwigExcelExtension extends ConfigurableExtension
16
{
17
    /**
18
     * {@inheritDoc}
19
     * @throws \Exception
20
     */
21
    protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
22
    {
23
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
24
        $loader->load('services.xml');
25
26
        $container->setParameter('mewes_k_twig_excel.pre_calculate_formulas', $mergedConfig['pre_calculate_formulas']);
27
        $container->setParameter('mewes_k_twig_excel.disk_caching_directory', $mergedConfig['disk_caching_directory']);
28
    }
29
}
30