getVar('flush') || strpos($request->getURL(), 'dev/build') === 0; // Default application $kernel = new AppKernel($flush); $app = new HTTPApplication($kernel); $app->addMiddleware(new OutputMiddleware()); $app->addMiddleware(new ErrorControlChainMiddleware($app, $request)); $app->handle($request);