MajimaKernel::getLogDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2017
4
 *
5
 * @package   Majima
6
 * @author    David Neustadt <[email protected]>
7
 * @copyright 2017 David Neustadt
8
 * @license   MIT
9
 */
10
11
namespace Majima;
12
13
use Majima\PluginBundle\PluginBundle;
14
use Symfony\Bundle\SecurityBundle\SecurityBundle;
15
use Symfony\Component\HttpKernel\Kernel;
16
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
17
use Symfony\Component\Config\Loader\LoaderInterface;
18
19
/**
20
 * Class MajimaKernel
21
 * @package Majima
22
 */
23
class MajimaKernel extends Kernel
24
{
25
    /**
26
     * @return array
27
     */
28
    public function registerBundles()
29
    {
30
        $bundles = [
31
            new FrameworkBundle(),
32
            new SecurityBundle(),
33
            new MajimaBundle(),
34
            new PluginBundle(),
35
        ];
36
        return $bundles;
37
    }
38
39
    /**
40
     * @param LoaderInterface $loader
41
     */
42
    public function registerContainerConfiguration(LoaderInterface $loader)
43
    {
44
        $loader->load(sprintf('%s/../config/config.php', __DIR__, $this->getEnvironment()));
45
        $loader->load(sprintf('%s/../config/security.php', __DIR__));
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getLogDir()
52
    {
53
        return __DIR__.'/../var/logs';
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getCacheDir()
60
    {
61
        return __DIR__.'/../var/cache/'.$this->getEnvironment();
62
    }
63
}