Completed
Push — master ( 03a8c3...2d8113 )
by Peter
02:49
created

AnimeDbPaginationExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 2
Metric Value
wmc 1
c 3
b 1
f 2
lcom 0
cbo 5
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/MIT
8
 */
9
namespace AnimeDb\Bundle\PaginationBundle\DependencyInjection;
10
11
use Symfony\Component\Config\FileLocator;
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\DependencyInjection\Loader;
14
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
15
16
/**
17
 * DependencyInjection.
18
 *
19
 * @author  Peter Gribanov <[email protected]>
20
 */
21
class AnimeDbPaginationExtension extends Extension
22
{
23
    /**
24
     * @param array $configs
25
     * @param ContainerBuilder $container
26
     */
27 1
    public function load(array $configs, ContainerBuilder $container)
28
    {
29 1
        $config = $this->processConfiguration(new Configuration(), $configs);
30
31 1
        $container->setParameter('pagination.max_navigate', $config['max_navigate']);
32 1
        $container->setParameter('pagination.template', $config['template']);
33
34 1
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
35 1
        $loader->load('services.yml');
36 1
    }
37
}
38