Completed
Push — wip-platform ( 442c75...159b0f )
by
unknown
02:42
created

AppKernel::getLogDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * Copyright (C) 2015-2017 Libre Informatique
5
 *
6
 * This file is licenced under the GNU LGPL v3.
7
 * For the full copyright and license information, please view the LICENSE.md
8
 * file that was distributed with this source code.
9
 */
10
11
use Symfony\Component\HttpKernel\Kernel;
12
use Symfony\Component\Config\Loader\LoaderInterface;
13
14
class AppKernel extends Kernel
15
{
16
    /*
17
     * @todo check what we need to register or not
18
     * @todo find a way to load this only on Functional test
19
     * @todo check what need to main composer.json
20
     */
21
22
    public function registerBundles()
23
    {
24
        $bundles = [
25
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
26
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
27
            new Symfony\Bundle\TwigBundle\TwigBundle(),
28
            // new Symfony\Bundle\MonologBundle\MonologBundle(),
29
            // new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
30
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
31
            // new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
32
33
            // Sonata
34
            new Sonata\CoreBundle\SonataCoreBundle(),
35
            new Sonata\BlockBundle\SonataBlockBundle(),
36
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
37
            new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
38
            new Sonata\AdminBundle\SonataAdminBundle(),
39
            // new Sonata\IntlBundle\SonataIntlBundle(),
40
41
            // Blast
42
            new Blast\Bundle\CoreBundle\BlastCoreBundle(),
43
        ];
44
45
        return $bundles;
46
    }
47
48
    public function registerContainerConfiguration(LoaderInterface $loader)
49
    {
50
        $loader->load(__DIR__ . '/config/config.yml');
51
    }
52
53
    public function getCacheDir()
54
    {
55
        return sys_get_temp_dir() . '/BlastCoreBundle/cache/' . $this->getEnvironment();
56
    }
57
58
    public function getLogDir()
59
    {
60
        return sys_get_temp_dir() . '/BlastCoreBundle/logs';
61
    }
62
}
63