Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- php bin/console cache:clear --env=prod --no-debug
- <?php
- use SymfonyComponentHttpKernelKernel;
- use SymfonyComponentConfigLoaderLoaderInterface;
- class AppKernel extends Kernel
- {
- public function registerBundles()
- {
- $bundles = [
- new SymfonyBundleFrameworkBundleFrameworkBundle(),
- new SymfonyBundleSecurityBundleSecurityBundle(),
- new SymfonyBundleTwigBundleTwigBundle(),
- new SymfonyBundleMonologBundleMonologBundle(),
- new SymfonyBundleSwiftmailerBundleSwiftmailerBundle(),
- new DoctrineBundleDoctrineBundleDoctrineBundle(),
- new NelmioApiDocBundleNelmioApiDocBundle(),
- new HomeBundleHomeBundle(),
- new UserBundleUserBundle(),
- ];
- if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
- $bundles[] = new SensioBundleFrameworkExtraBundleSensioFrameworkExtraBundle();
- $bundles[] = new SymfonyBundleDebugBundleDebugBundle();
- $bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
- $bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
- $bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
- }
- return $bundles;
- }
- public function getRootDir()
- {
- return __DIR__;
- }
- public function getCacheDir()
- {
- return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
- }
- public function getLogDir()
- {
- return dirname(__DIR__).'/var/logs';
- }
- public function registerContainerConfiguration(LoaderInterface $loader)
- {
- $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
- }
- }
- user:
- resource: "@UserBundle/Controller"
- type: annotation
- prefix: /user
- home:
- resource: "@HomeBundle/Controller"
- type: annotation
- prefix: /
- NelmioApiDocBundle:
- resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
- prefix: /api/doc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement