aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/AppKernel.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-01-14 18:15:07 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-15 09:35:39 +0100
commit73cd160bfc6e4a1b88f2117eb0c097a91ac5c753 (patch)
treec5ccc9fa57f243126538ae8d9a2f8c459c08bd8c /app/AppKernel.php
parent1d405d0e62a708928bccd2222ebd89d4804231f9 (diff)
downloadwallabag-73cd160bfc6e4a1b88f2117eb0c097a91ac5c753.tar.gz
wallabag-73cd160bfc6e4a1b88f2117eb0c097a91ac5c753.tar.zst
wallabag-73cd160bfc6e4a1b88f2117eb0c097a91ac5c753.zip
Switch to Symfony 3 structure
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r--app/AppKernel.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index d97842f9..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'), true)) { 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,6 +46,21 @@ 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($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 66 $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');