|
1 | 1 | <?php
|
2 | 2 |
|
| 3 | +// This is the front controller used when executing the application in the |
| 4 | +// production environment ('prod'). See |
| 5 | +// |
| 6 | +// * http://symfony.com/doc/current/cookbook/configuration/front_controllers_and_kernel.html |
| 7 | +// * http://symfony.com/doc/current/cookbook/configuration/environments.html |
| 8 | + |
3 | 9 | use Symfony\Component\ClassLoader\ApcClassLoader;
|
4 | 10 | use Symfony\Component\HttpFoundation\Request;
|
5 | 11 |
|
|
9 | 15 | // lines to use APC for class autoloading. This can improve application performance
|
10 | 16 | // very significantly. See http://symfony.com/doc/current/components/class_loader/cache_class_loader.html#apcclassloader
|
11 | 17 | //
|
| 18 | +// NOTE: The first argument of ApcClassLoader() is the prefix used to prevent |
| 19 | +// cache key conflicts. In a real Symfony application, make sure to change |
| 20 | +// it to a value that it's unique in the web server. A common practice is to use |
| 21 | +// the domain name associated to the Symfony application (e.g. 'example_com'). |
| 22 | +// |
12 | 23 | // $apcLoader = new ApcClassLoader('symfony_demo', $loader);
|
13 | 24 | // $loader->unregister();
|
14 | 25 | // $apcLoader->register(true);
|
15 |
| -// |
16 |
| -// The first argument of ApcClassLoader() is a prefix that will be used to |
17 |
| -// prevent cache key conflicts. In a real Symfony application, make sure to change |
18 |
| -// it to a value that it's unique in the web server. A common practice is to use |
19 |
| -// the domain name associated to the Symfony application. |
20 | 26 |
|
21 | 27 | require_once __DIR__.'/../app/AppKernel.php';
|
22 | 28 |
|
|
27 | 33 | // See http://symfony.com/doc/current/book/http_cache.html#symfony-reverse-proxy
|
28 | 34 | //
|
29 | 35 | // require_once __DIR__.'/../app/AppCache.php';
|
30 |
| -// $kernel = new AppKernel('prod', false); |
31 |
| -// $kernel->loadClassCache(); |
32 | 36 | // $kernel = new AppCache($kernel);
|
33 | 37 | // Request::enableHttpMethodParameterOverride();
|
34 | 38 |
|
35 | 39 | $request = Request::createFromGlobals();
|
36 | 40 | $response = $kernel->handle($request);
|
37 | 41 | $response->send();
|
| 42 | + |
38 | 43 | $kernel->terminate($request, $response);
|
0 commit comments