Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. php bin/console cache:clear --env=prod --no-debug
  2.  
  3. <?php
  4.  
  5. use SymfonyComponentHttpKernelKernel;
  6. use SymfonyComponentConfigLoaderLoaderInterface;
  7.  
  8. class AppKernel extends Kernel
  9. {
  10. public function registerBundles()
  11. {
  12. $bundles = [
  13. new SymfonyBundleFrameworkBundleFrameworkBundle(),
  14. new SymfonyBundleSecurityBundleSecurityBundle(),
  15. new SymfonyBundleTwigBundleTwigBundle(),
  16. new SymfonyBundleMonologBundleMonologBundle(),
  17. new SymfonyBundleSwiftmailerBundleSwiftmailerBundle(),
  18. new DoctrineBundleDoctrineBundleDoctrineBundle(),
  19. new NelmioApiDocBundleNelmioApiDocBundle(),
  20. new HomeBundleHomeBundle(),
  21. new UserBundleUserBundle(),
  22. ];
  23.  
  24. if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
  25. $bundles[] = new SensioBundleFrameworkExtraBundleSensioFrameworkExtraBundle();
  26. $bundles[] = new SymfonyBundleDebugBundleDebugBundle();
  27. $bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
  28. $bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
  29. $bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
  30. }
  31.  
  32. return $bundles;
  33. }
  34.  
  35. public function getRootDir()
  36. {
  37. return __DIR__;
  38. }
  39.  
  40. public function getCacheDir()
  41. {
  42. return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
  43. }
  44.  
  45. public function getLogDir()
  46. {
  47. return dirname(__DIR__).'/var/logs';
  48. }
  49.  
  50. public function registerContainerConfiguration(LoaderInterface $loader)
  51. {
  52. $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
  53. }
  54. }
  55.  
  56. user:
  57. resource: "@UserBundle/Controller"
  58. type: annotation
  59. prefix: /user
  60.  
  61. home:
  62. resource: "@HomeBundle/Controller"
  63. type: annotation
  64. prefix: /
  65.  
  66. NelmioApiDocBundle:
  67. resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
  68. prefix: /api/doc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement