Mercurial > hg > dml-open-vis
annotate a_prod.php @ 1:f38015048f48 tip
Added GPL
author | Daniel Wolff |
---|---|
date | Sat, 13 Feb 2016 20:43:38 +0100 |
parents | 493bcb69166c |
children |
rev | line source |
---|---|
Daniel@0 | 1 <?php |
Daniel@0 | 2 |
Daniel@0 | 3 use Symfony\Component\ClassLoader\ApcClassLoader; |
Daniel@0 | 4 use Symfony\Component\HttpFoundation\Request; |
Daniel@0 | 5 |
Daniel@0 | 6 $loader = require_once __DIR__.'/app/bootstrap.php.cache'; |
Daniel@0 | 7 |
Daniel@0 | 8 // Use APC for autoloading to improve performance. |
Daniel@0 | 9 // Change 'sf2' to a unique prefix in order to prevent cache key conflicts |
Daniel@0 | 10 // with other applications also using APC. |
Daniel@0 | 11 /* |
Daniel@0 | 12 $apcLoader = new ApcClassLoader('sf2', $loader); |
Daniel@0 | 13 $loader->unregister(); |
Daniel@0 | 14 $apcLoader->register(true); |
Daniel@0 | 15 */ |
Daniel@0 | 16 |
Daniel@0 | 17 require_once __DIR__.'/app/AppKernel.php'; |
Daniel@0 | 18 //require_once __DIR__.'/app/AppCache.php'; |
Daniel@0 | 19 |
Daniel@0 | 20 $kernel = new AppKernel('prod', false); |
Daniel@0 | 21 $kernel->loadClassCache(); |
Daniel@0 | 22 //$kernel = new AppCache($kernel); |
Daniel@0 | 23 |
Daniel@0 | 24 // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter |
Daniel@0 | 25 //Request::enableHttpMethodParameterOverride(); |
Daniel@0 | 26 $request = Request::createFromGlobals(); |
Daniel@0 | 27 $response = $kernel->handle($request); |
Daniel@0 | 28 $response->send(); |
Daniel@0 | 29 $kernel->terminate($request, $response); |