mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-16 04:10:09 -07:00
62 lines
2.2 KiB
PHP
62 lines
2.2 KiB
PHP
<?php
|
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
use Symfony\Component\HttpKernel\Kernel;
|
|
|
|
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 Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
|
new AppBundle\AppBundle(),
|
|
new LoaderBundle\LoaderBundle(),
|
|
new FrontBundle\FrontBundle(),
|
|
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
|
|
new Oneup\FlysystemBundle\OneupFlysystemBundle(),
|
|
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
|
|
new Liip\ImagineBundle\LiipImagineBundle(),
|
|
new FOS\ElasticaBundle\FOSElasticaBundle()
|
|
];
|
|
|
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
|
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
|
if ('test' === $this->getEnvironment()) {
|
|
$bundles[] = new Liip\FunctionalTestBundle\LiipFunctionalTestBundle();
|
|
}
|
|
}
|
|
|
|
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');
|
|
}
|
|
}
|