AppKernel.php 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 Symfony\Bundle\AsseticBundle\AsseticBundle(),
  16. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  17. new JMS\AopBundle\JMSAopBundle(),
  18. new JMS\DiExtraBundle\JMSDiExtraBundle($this),
  19. new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
  20. new FOS\UserBundle\FOSUserBundle(),
  21. new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
  22. new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
  23. //new Sonata\jQueryBundle\SonatajQueryBundle(),
  24. //new Sonata\BluePrintBundle\SonataBluePrintBundle(),
  25. //new Sonata\AdminBundle\SonataAdminBundle(),
  26. //new Knp\Bundle\MenuBundle\KnpMenuBundle(),
  27. new Gregwar\ImageBundle\GregwarImageBundle(),
  28. new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(),
  29. new Knp\Bundle\MenuBundle\KnpMenuBundle(),
  30. new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
  31. new Shtumi\UsefulBundle\ShtumiUsefulBundle(),
  32. new FOS\FacebookBundle\FOSFacebookBundle(),
  33. new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
  34. new Muzich\CoreBundle\MuzichCoreBundle(),
  35. new Muzich\UserBundle\MuzichUserBundle(),
  36. new Muzich\IndexBundle\MuzichIndexBundle(),
  37. new Muzich\HomeBundle\MuzichHomeBundle(),
  38. new Muzich\MynetworkBundle\MuzichMynetworkBundle(),
  39. //new Muzich\AdminBundle\MuzichAdminBundle(),
  40. new Muzich\GroupBundle\MuzichGroupBundle(),
  41. new Muzich\FavoriteBundle\MuzichFavoriteBundle(),
  42. new Muzich\CommentBundle\MuzichCommentBundle(),
  43. new Muzich\AdminBundle\MuzichAdminBundle(),
  44. new Muzich\PlaylistBundle\MuzichPlaylistBundle(),
  45. );
  46. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  47. $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  48. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  49. $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  50. $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  51. }
  52. return $bundles;
  53. }
  54. public function registerContainerConfiguration(LoaderInterface $loader)
  55. {
  56. $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
  57. }
  58. public function init()
  59. {
  60. if ($this->debug) {
  61. ini_set('display_errors', 1);
  62. error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
  63. } else {
  64. ini_set('display_errors', 0);
  65. }
  66. }
  67. }