2017-03-29 09:24:59 -07:00
|
|
|
<?php
|
|
|
|
|
2017-04-22 12:43:30 -07:00
|
|
|
/*
|
|
|
|
* doughnutwedding.com
|
|
|
|
* Copyright (C) 2017 http://doughnutwedding.com eric@doughnutwedding.com
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2017-03-29 09:24:59 -07:00
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
2017-04-22 12:43:30 -07:00
|
|
|
use Symfony\Component\HttpKernel\Kernel;
|
2017-03-29 09:24:59 -07:00
|
|
|
|
|
|
|
class AppKernel extends Kernel
|
|
|
|
{
|
|
|
|
public function registerBundles()
|
|
|
|
{
|
|
|
|
$bundles = [
|
|
|
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
|
|
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
|
|
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
|
|
|
new Symfony\Bundle\MonologBundle\MonologBundle(),
|
|
|
|
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
|
|
|
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
2017-03-29 15:18:01 -07:00
|
|
|
new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
|
2017-03-29 09:24:59 -07:00
|
|
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
2017-03-29 15:18:01 -07:00
|
|
|
new \Snc\RedisBundle\SncRedisBundle(),
|
2017-04-09 18:08:01 -07:00
|
|
|
new \HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
|
|
|
|
new \FOS\UserBundle\FOSUserBundle(),
|
2017-04-22 20:58:42 -07:00
|
|
|
new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
|
|
|
|
new Vich\UploaderBundle\VichUploaderBundle(),
|
2017-04-26 21:32:43 -07:00
|
|
|
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
|
2017-03-29 09:24:59 -07:00
|
|
|
new Sikofitt\DoughnutWeddingBundle\SikofittDoughnutWeddingBundle(),
|
2017-05-05 22:49:54 -07:00
|
|
|
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
2017-03-29 09:24:59 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
|
|
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
|
|
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
|
|
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
|
|
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
|
|
|
}
|
|
|
|
|
|
|
|
return $bundles;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRootDir()
|
|
|
|
{
|
|
|
|
return __DIR__;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCacheDir()
|
|
|
|
{
|
|
|
|
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getLogDir()
|
|
|
|
{
|
|
|
|
return dirname(__DIR__).'/var/logs';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
|
|
|
{
|
|
|
|
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
|
|
|
|
}
|
|
|
|
}
|