AppKernel.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Symfony\Component\Config\Loader\LoaderInterface;
  3. use Symfony\Component\HttpKernel\Kernel;
  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 Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
  16. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  17. new FOS\UserBundle\FOSUserBundle(),
  18. new Http\HttplugBundle\HttplugBundle(),
  19. new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
  20. new Snc\RedisBundle\SncRedisBundle(),
  21. new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
  22. new Nelmio\SecurityBundle\NelmioSecurityBundle(),
  23. new Knp\Bundle\MenuBundle\KnpMenuBundle(),
  24. new Nelmio\CorsBundle\NelmioCorsBundle(),
  25. new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
  26. new Endroid\QrCodeBundle\EndroidQrCodeBundle(),
  27. new Packagist\WebBundle\PackagistWebBundle(),
  28. );
  29. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  30. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  31. $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  32. }
  33. return $bundles;
  34. }
  35. public function registerContainerConfiguration(LoaderInterface $loader)
  36. {
  37. $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
  38. }
  39. }