aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/AppKernel.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
commit1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch)
tree8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /app/AppKernel.php
parent790573d45899504bdecd2573c8f64018e23b139e (diff)
parent131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff)
downloadwallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r--app/AppKernel.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index d2aa8d1c..7e76a9e9 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -7,7 +7,7 @@ class AppKernel extends Kernel
7{ 7{
8 public function registerBundles() 8 public function registerBundles()
9 { 9 {
10 $bundles = array( 10 $bundles = [
11 new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 11 new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12 new Symfony\Bundle\SecurityBundle\SecurityBundle(), 12 new Symfony\Bundle\SecurityBundle\SecurityBundle(),
13 new Symfony\Bundle\TwigBundle\TwigBundle(), 13 new Symfony\Bundle\TwigBundle\TwigBundle(),
@@ -33,9 +33,9 @@ class AppKernel extends Kernel
33 new KPhoen\RulerZBundle\KPhoenRulerZBundle(), 33 new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
34 new Wallabag\ImportBundle\WallabagImportBundle(), 34 new Wallabag\ImportBundle\WallabagImportBundle(),
35 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), 35 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
36 ); 36 ];
37 37
38 if (in_array($this->getEnvironment(), array('dev', 'test'))) { 38 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
39 $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 39 $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
40 $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 40 $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
41 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 41 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
@@ -46,8 +46,23 @@ class AppKernel extends Kernel
46 return $bundles; 46 return $bundles;
47 } 47 }
48 48
49 public function getRootDir()
50 {
51 return __DIR__;
52 }
53
54 public function getCacheDir()
55 {
56 return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
57 }
58
59 public function getLogDir()
60 {
61 return dirname(__DIR__).'/var/logs';
62 }
63
49 public function registerContainerConfiguration(LoaderInterface $loader) 64 public function registerContainerConfiguration(LoaderInterface $loader)
50 { 65 {
51 $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 66 $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
52 } 67 }
53} 68}