Completed
Pull Request — master (#91)
by Piotr
02:36
created

AppKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 15

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0
wmc 4
lcom 0
cbo 15
rs 9.1666

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 18 1
A registerContainerConfiguration() 0 4 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
1
<?php
2
3
use Symfony\Component\HttpKernel\Kernel;
4
use Symfony\Component\Config\Loader\LoaderInterface;
5
6
class AppKernel extends Kernel
7
{
8
    public function registerBundles()
9
    {
10
        return array(
11
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
13
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
14
            new Symfony\Bundle\TwigBundle\TwigBundle(),
15
            new Symfony\Bundle\MonologBundle\MonologBundle(),
16
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
17
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
18
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
19
            new FSi\Bundle\DataSourceBundle\DataSourceBundle(),
20
            new FSi\Bundle\DataGridBundle\DataGridBundle(),
21
            new FSi\Bundle\AdminBundle\FSiAdminBundle(),
22
            new FSi\FixturesBundle\FSiFixturesBundle(),
23
            new FSi\Bundle\AdminSecurityBundle\FSiAdminSecurityBundle()
24
        );
25
    }
26
27
    public function registerContainerConfiguration(LoaderInterface $loader)
28
    {
29
        $loader->load(sprintf('%s/config/config.yml', __DIR__));
30
    }
31
32
    public function getCacheDir()
33
    {
34
        return sys_get_temp_dir() . '/FSiAdminSecurityBundle/cache';
35
    }
36
37
    public function getLogDir()
38
    {
39
        return sys_get_temp_dir() . '/FSiAdminSecurityBundle/logs';
40
    }
41
}
42