app.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. // If you don't want to setup permissions the proper way, just uncomment the following PHP line
  3. // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
  4. umask(0000);
  5. $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  6. // Use APC for autoloading to improve performance.
  7. // Change 'sf2' to a unique prefix in order to prevent cache key conflicts
  8. // with other applications also using APC.
  9. /*
  10. $apcLoader = new ApcClassLoader('sf2', $loader);
  11. $loader->unregister();
  12. $apcLoader->register(true);
  13. */
  14. require_once __DIR__.'/../app/AppKernel.php';
  15. //require_once __DIR__.'/../app/AppCache.php';
  16. require_once __DIR__.'/legacy.php';
  17. use Sonata\PageBundle\Request\RequestFactory;
  18. // if you want to use the SonataPageBundle with multisite
  19. // using different relative paths, you must change the request
  20. // object to use the SiteRequest
  21. $request = RequestFactory::createFromGlobals('host_with_path_by_locale');
  22. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  23. $request->enableHttpMethodParameterOverride();
  24. $kernel = new AppKernel('prod', false);
  25. $response = $kernel->handle($request);
  26. $response->send();
  27. $kernel->terminate($request, $response);