app.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Symfony\Component\ClassLoader\ApcClassLoader;
  3. //use Symfony\Component\HttpFoundation\Request;
  4. $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  5. // Use APC for autoloading to improve performance.
  6. // Change 'sf2' to a unique prefix in order to prevent cache key conflicts
  7. // with other applications also using APC.
  8. /*
  9. $apcLoader = new ApcClassLoader('sf2', $loader);
  10. $loader->unregister();
  11. $apcLoader->register(true);
  12. */
  13. require_once __DIR__.'/../app/AppKernel.php';
  14. //require_once __DIR__.'/../app/AppCache.php';
  15. require_once __DIR__.'/legacy.php';
  16. // if you want to use the SonataPageBundle with multisite
  17. // using different relative paths, you must change the request
  18. // object to use the SiteRequest
  19. use Sonata\PageBundle\Request\SiteRequest as Request;
  20. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  21. //Request::enableHttpMethodParameterOverride();
  22. $request = Request::createFromGlobals();
  23. $kernel = new AppKernel('prod', false);
  24. $kernel->loadClassCache();
  25. //$kernel = new AppCache($kernel);
  26. $response = $kernel->handle($request);
  27. $response->send();
  28. $kernel->terminate($request, $response);