forward() защищенный Метод

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 A Response instance (the stale entry if present, null otherwise)
Результат Symfony\Component\HttpFoundation\Response A Response instance
Пример #1
0
 /**
  * Forwards the Request to the backend and returns the Response.
  *
  * @param Request  $request A Request instance
  * @param Boolean  $raw     Whether to catch exceptions or not
  * @param Response $entry   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)
 {
     $this->getKernel()->boot();
     $this->getKernel()->getContainer()->set('cache', $this);
     $this->getKernel()->getContainer()->set('esi', $this->getEsi());
     return parent::forward($request, $raw, $entry);
 }
Пример #2
0
 /**
  * Forwards the Request to the backend and returns the Response.
  *
  * @param Request  $request A Request instance
  * @param Boolean  $raw     Whether to catch exceptions or not
  * @param Response $entry   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)
 {
     $this->getKernel()->boot();
     /** @var $container \Shopware\Components\DependencyInjection\Container */
     $container = $this->getKernel()->getContainer();
     $container->set('HttpCache', $this);
     return parent::forward($request, $raw, $entry);
 }
Пример #3
0
    /**
     * Forwards the Request to the backend and returns the Response.
     *
     * @param Request $request A Request instance
     * @param Boolean $raw Whether to catch exceptions or not
     * @param Response $entry 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)
    {
        /** @var $bootstrap \Shopware_Bootstrap */
        $bootstrap = $this->getKernel()->getApp()->Bootstrap();

        $bootstrap->registerResource('HttpCache', $this);
        $bootstrap->registerResource('Esi', $this->esi);

        return parent::forward($request, $raw, $entry);
    }