aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/AppKernel.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r--app/AppKernel.php27
1 files changed, 18 insertions, 9 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index c8382d5f..90e9f1d8 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -1,7 +1,7 @@
1<?php 1<?php
2 2
3use Symfony\Component\HttpKernel\Kernel;
4use Symfony\Component\Config\Loader\LoaderInterface; 3use Symfony\Component\Config\Loader\LoaderInterface;
4use Symfony\Component\HttpKernel\Kernel;
5 5
6class AppKernel extends Kernel 6class AppKernel extends Kernel
7{ 7{
@@ -48,28 +48,37 @@ class AppKernel extends Kernel
48 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 48 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
49 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 49 $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
50 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); 50 $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
51 $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
52
53 if ('test' === $this->getEnvironment()) {
54 $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
55 }
51 } 56 }
52 57
53 return $bundles; 58 return $bundles;
54 } 59 }
55 60
56 public function getRootDir()
57 {
58 return __DIR__;
59 }
60
61 public function getCacheDir() 61 public function getCacheDir()
62 { 62 {
63 return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); 63 return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
64 } 64 }
65 65
66 public function getLogDir() 66 public function getLogDir()
67 { 67 {
68 return dirname(__DIR__).'/var/logs'; 68 return dirname(__DIR__) . '/var/logs';
69 } 69 }
70 70
71 public function registerContainerConfiguration(LoaderInterface $loader) 71 public function registerContainerConfiguration(LoaderInterface $loader)
72 { 72 {
73 $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 73 $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
74 $loader->load(function ($container) {
75 if ($container->getParameter('use_webpack_dev_server')) {
76 $container->loadFromExtension('framework', [
77 'assets' => [
78 'base_url' => 'http://localhost:8080/',
79 ],
80 ]);
81 }
82 });
74 } 83 }
75} 84}