AppKernel::getCacheDir()   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\ObjectRender\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 \Psi\Bundle\ObjectRender\PsiObjectRenderBundle(),
15
        ];
16
17
        return $bundles;
18
    }
19
20
    public function getRootDir()
21
    {
22
        return __DIR__;
23
    }
24
25
    public function getCacheDir()
26
    {
27
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
28
    }
29
30
    public function getLogDir()
31
    {
32
        return dirname(__DIR__).'/var/logs';
33
    }
34
35
    public function registerContainerConfiguration(LoaderInterface $loader)
36
    {
37
        $loader->load($this->getRootDir().'/config/config.yml');
38
    }
39
}
40