AppKernel::getRootDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Psi\Bundle\Description\Example\app;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class AppKernel extends Kernel
9
{
10
    public function registerBundles()
11
    {
12
        $bundles = [
13
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
14
            new \Symfony\Bundle\TwigBundle\TwigBundle(),
15
            new \Psi\Bundle\Description\PsiDescriptionBundle(),
16
        ];
17
18
        return $bundles;
19
    }
20
21
    public function getRootDir()
22
    {
23
        return __DIR__;
24
    }
25
26
    public function getCacheDir()
27
    {
28
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
29
    }
30
31
    public function getLogDir()
32
    {
33
        return dirname(__DIR__).'/var/logs';
34
    }
35
36
    public function registerContainerConfiguration(LoaderInterface $loader)
37
    {
38
        $loader->load($this->getRootDir().'/config/config.yml');
39
    }
40
}
41