AppKernel.php 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
  15. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  16. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  17. new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
  18. new FOS\UserBundle\FOSUserBundle(),
  19. new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
  20. new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
  21. new Muzich\CoreBundle\MuzichCoreBundle(),
  22. new Muzich\UserBundle\MuzichUserBundle(),
  23. new Muzich\IndexBundle\MuzichIndexBundle(),
  24. new Muzich\HomeBundle\MuzichHomeBundle(),
  25. new Muzich\MynetworkBundle\MuzichMynetworkBundle(),
  26. );
  27. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  28. $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  29. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  30. $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  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. }