public static function runApplication($env, $debug) { if (self::$_container) { throw new \Exception(); } $kernel = new AppKernel($env, $debug); $kernel->loadClassCache(); $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); \Dev::Bootstrap($kernel, $request); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response); }