Created
May 23, 2012 13:16
-
-
Save ivoba/2775189 to your computer and use it in GitHub Desktop.
Tweaked Symfony2 bootstrap file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Tweaked Symfony2 bootstrap file | |
| */ | |
| // if you don't want to setup permissions the proper way, just uncomment the following PHP line | |
| // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information | |
| umask(0000); | |
| if ( file_exists( dirname(__FILE__).'/../.env.php' ) ){ | |
| $env = require_once( dirname(__FILE__).'/../.env.php' ); | |
| } | |
| $env = isset( $env )? $env : 'prod'; | |
| $debug = true; | |
| if($env == 'prod'){ | |
| $debug = false; | |
| } | |
| require_once __DIR__.'/../app/bootstrap.php.cache'; | |
| require_once __DIR__.'/../app/AppKernel.php'; | |
| use Symfony\Component\HttpFoundation\Request; | |
| $kernel = new AppKernel($env, $debug); | |
| $kernel->loadClassCache(); | |
| if( $env != 'dev' ){ | |
| //require_once __DIR__.'/../app/AppCache.php'; | |
| //$kernel = new AppCache($kernel); | |
| } | |
| $request = Request::createFromGlobals(); | |
| $response = $kernel->handle($request); | |
| $response->send(); | |
| $kernel->terminate($request, $response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment