public function restoreRequest($key): void
    {
        $session = $this->getSession('Arachne.Application/requests');
        if (!isset($session[$key]) || ($this->user !== null && $session[$key][0] !== null && $session[$key][0] !== $this->user->getId())) {
            return;
        }
        $request = clone $session[$key][1];
        unset($session[$key]);

        try {
            $this->loader->filterIn($request);
        } catch (BadRequestException $e) {
            return;
        }
        $request->setFlag(Request::RESTORED, true);
        $parameters = $request->getParameters();
        $parameters[self::FLASH_KEY] = $this->getParameter(self::FLASH_KEY);
        $request->setParameters($parameters);
        $this->sendResponse(new ForwardResponse($request));
    }
public function restoreRequest($key): void
    {
        $session = $this->getSession('Arachne.Application/requests');
        if (!isset($session[$key]) || ($this->user !== null && $session[$key][0] !== null && $session[$key][0] !== $this->user->getId())) {
            return;
        }
        $request = clone $session[$key][1];
        unset($session[$key]);

        try {
            $this->loader->filterIn($request);
        } catch (BadRequestException $e) {
            return;
        }
        $request->setFlag(Request::RESTORED, true);
        $parameters = $request->getParameters();
        $parameters[self::FLASH_KEY] = $this->getParameter(self::FLASH_KEY);
        $request->setParameters($parameters);
        $this->sendResponse(new ForwardResponse($request));
    }
public function restoreRequest ( $ key ) : void { $ session = $ this -> getSession ( 'Arachne.Application/requests' ) ; if ( ! isset ( $ session [ $ key ] ) || ( $ this -> user !== null && $ session [ $ key ] [ 0 ] !== null && $ session [ $ key ] [ 0 ] !== $ this -> user -> getId ( ) ) ) { return ; } $ request = clone $ session [ $ key ] [ 1 ] ; unset ( $ session [ $ key ] ) ; try { $ this -> loader -> filterIn ( $ request ) ; } catch ( BadRequestException $ e ) { return ; } $ request -> setFlag ( Request :: RESTORED , true ) ; $ parameters = $ request -> getParameters ( ) ; $ parameters [ self :: FLASH_KEY ] = $ this -> getParameter ( self :: FLASH_KEY ) ; $ request -> setParameters ( $ parameters ) ; $ this -> sendResponse ( new ForwardResponse ( $ request ) ) ; }
Restores request from session.

@param string $key
Restores request from session .