forward() protected method

Forwards the Request to the backend and returns the Response.
protected forward ( Request $request, boolean $catch = false, Response $entry = null ) : Response
$request Symfony\Component\HttpFoundation\Request A Request instance
$catch boolean Whether to catch exceptions or not
$entry Symfony\Component\HttpFoundation\Response
return Symfony\Component\HttpFoundation\Response A Response instance
Beispiel #1
0
 /**
  * Forwards the Request to the backend and returns the Response.
  *
  * @param Requset  $request  A Request instance
  * @param Boolean  $raw      Whether to catch exceptions or not
  * @param Response $response A Response instance (the stale entry if present, null otherwise)
  *
  * @return Response A Response instance
  */
 protected function forward(Request $request, $raw = false, Response $entry = null)
 {
     if (!$this->kernel->isBooted()) {
         $this->kernel->boot();
     }
     $this->kernel->getContainer()->set('cache', $this);
     $this->kernel->getContainer()->set('esi', $this->esi);
     return parent::forward($request, $raw, $entry);
 }