<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
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(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
//new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new \FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new \Knp\Bundle\MenuBundle\KnpMenuBundle(),
new \Liip\ImagineBundle\LiipImagineBundle(),
new Stfalcon\Bundle\TinymceBundle\StfalconTinymceBundle(),
new Rollerworks\Bundle\PasswordStrengthBundle\RollerworksPasswordStrengthBundle(),
new \Oneup\FlysystemBundle\OneupFlysystemBundle(),
new RedjanYm\FCMBundle\RedjanYmFCMBundle(),
new Symfony\WebpackEncoreBundle\WebpackEncoreBundle(),
new \SecIT\ImapBundle\ImapBundle(),
new \BoShurik\TelegramBotBundle\BoShurikTelegramBotBundle(),
new Kreait\Firebase\Symfony\Bundle\FirebaseBundle(),
new \Diplix\Commons\DataHandlingBundle\DiplixDataHandlingBundle(),
new LayoutBundle\LayoutBundle(),
new Diplix\KMGBundle\DiplixKMGBundle(),
);
//if (in_array($this->getEnvironment(), array('dev', 'test','debug',), 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 registerContainerConfiguration(LoaderInterface $loader)
{
$envOnlyFile = $this->getProjectDir().'/app/config/domains/configs/_env-only.yml';
$e = $this->getEnvironment();
if (strpos($e,'domain_')===0)
{
// circumvent default behaviour
$f = $this->getProjectDir().'/app/config/domains/configs/'.$e.'.yml';
if (!file_exists($f))
{
// if a domain is configured explicitly, it must have a config file
die('This domain is not configured properly, yet. Please contact the administrator.('.$e.')');
}
$loader->load($f);
return;
}
$loader->load($envOnlyFile);
// skip default sf3 flow completely :: $loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml');
}
}