示例#1
0
 /**
  * Main run method with HTTP Cache.
  *
  * @param Request $request
  */
 public function run(Request $request = null)
 {
     if ($this['debug'] || !$this->isOpen()) {
         parent::run($request);
     } else {
         $this['http_cache']->run($request);
     }
 }
示例#2
0
 /**
  * Render to response twig views.
  *
  * @param          $view
  * @param array $parameters
  * @param Response $response
  *
  * @return Response
  */
 protected function render($view, array $parameters = array(), Response $response = null)
 {
     return $this->app->render($view, $parameters, $response);
 }