web/app.php line 39

Open in your IDE?
  1. <?php
  2. use Symfony\Component\Debug\Debug;
  3. use Symfony\Component\HttpFoundation\Request;
  4. /**
  5.  * @var Composer\Autoload\ClassLoader
  6.  */
  7. $loader = require __DIR__.'/../app/autoload.php';
  8. include_once __DIR__.'/../var/bootstrap.php.cache';
  9. // Enable APC for autoloading to improve performance.
  10. // You should change the ApcClassLoader first argument to a unique prefix
  11. // in order to prevent cache key conflicts with other applications
  12. // also using APC.
  13. /*
  14. $apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
  15. $loader->unregister();
  16. $apcLoader->register(true);
  17. */
  18. $env 'prod';
  19. $debug false;
  20. if ($_SERVER['HTTP_HOST'] == 'am.staging.qwh.nl') {
  21.     $env 'dev';
  22.     $debug true;
  23.     Debug::enable();
  24. }
  25. $kernel = new AppKernel($env$debug);
  26. $kernel->loadClassCache();
  27. //$kernel = new AppCache($kernel);
  28. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  29. //Request::enableHttpMethodParameterOverride();
  30. $request Request::createFromGlobals();
  31. $response $kernel->handle($request);
  32. $response->send();
  33. $kernel->terminate($request$response);