app/AppKernel.php line 8

Open in your IDE?
  1. <?php
  2. use Symfony\Component\HttpKernel\Kernel;
  3. use Symfony\Component\Config\Loader\LoaderInterface;
  4. class AppKernel extends Kernel
  5. {
  6.     public function registerBundles()
  7.     {
  8.         $bundles = array(
  9.             new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
  10.             new Symfony\Bundle\SecurityBundle\SecurityBundle(),
  11.             new Symfony\Bundle\TwigBundle\TwigBundle(),
  12.             new Symfony\Bundle\MonologBundle\MonologBundle(),
  13.             new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
  14.             new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
  15.             new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  16.             //new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  17.             new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
  18.             new \FOS\JsRoutingBundle\FOSJsRoutingBundle(),
  19.             new \Knp\Bundle\MenuBundle\KnpMenuBundle(),
  20.             new \Liip\ImagineBundle\LiipImagineBundle(),
  21.             new Stfalcon\Bundle\TinymceBundle\StfalconTinymceBundle(),
  22.             new Rollerworks\Bundle\PasswordStrengthBundle\RollerworksPasswordStrengthBundle(),
  23.             new \Oneup\FlysystemBundle\OneupFlysystemBundle(),
  24.             new RedjanYm\FCMBundle\RedjanYmFCMBundle(),
  25.             new Symfony\WebpackEncoreBundle\WebpackEncoreBundle(),
  26.             new \SecIT\ImapBundle\ImapBundle(),
  27.             new \BoShurik\TelegramBotBundle\BoShurikTelegramBotBundle(),
  28.             new Kreait\Firebase\Symfony\Bundle\FirebaseBundle(),
  29.             new \Diplix\Commons\DataHandlingBundle\DiplixDataHandlingBundle(),
  30.             new LayoutBundle\LayoutBundle(),
  31.             new Diplix\KMGBundle\DiplixKMGBundle(),
  32.         );
  33.         //if (in_array($this->getEnvironment(), array('dev', 'test','debug',), true))
  34.         {
  35.             $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
  36.             $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  37. //            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  38. //            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  39.         }
  40.         return $bundles;
  41.     }
  42.     public function registerContainerConfiguration(LoaderInterface $loader)
  43.     {
  44.         $envOnlyFile $this->getProjectDir().'/app/config/domains/configs/_env-only.yml';
  45.         $e $this->getEnvironment();
  46.         if (strpos($e,'domain_')===0)
  47.         {
  48.             // circumvent default behaviour
  49.             $f $this->getProjectDir().'/app/config/domains/configs/'.$e.'.yml';
  50.             if (!file_exists($f))
  51.             {
  52.                 // if a domain is configured explicitly, it must have a config file
  53.                 die('This domain is not configured properly, yet. Please contact the administrator.('.$e.')');
  54.             }
  55.             $loader->load($f);
  56.             return;
  57.         }
  58.         $loader->load($envOnlyFile);
  59.         // skip default sf3 flow completely :: $loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml');
  60.     }
  61. }