final public function setWebRequest(WebRequest $request)
    {
        if (self::$csrfValidation && $request->server('REQUEST_METHOD') == 'POST'){
            CsrfProtection::singleton()->validateHeaders($request);
            CsrfProtection::singleton()->validateCookie($request);
        }

        $this->request = $request;

        $this->parseRequest($request);
        $this->view->setWebRequest($request);

        $this->model->onAfterRequestSet();
        $this->onStateRestored();
    }
final public function setWebRequest(WebRequest $request)
    {
        if (self::$csrfValidation && $request->server('REQUEST_METHOD') == 'POST'){
            CsrfProtection::singleton()->validateHeaders($request);
            CsrfProtection::singleton()->validateCookie($request);
        }

        $this->request = $request;

        $this->parseRequest($request);
        $this->view->setWebRequest($request);

        $this->model->onAfterRequestSet();
        $this->onStateRestored();
    }
final public function setWebRequest ( WebRequest $ request ) { if ( self :: $ csrfValidation && $ request -> server ( 'REQUEST_METHOD' ) == 'POST' ) { CsrfProtection :: singleton ( ) -> validateHeaders ( $ request ) ; CsrfProtection :: singleton ( ) -> validateCookie ( $ request ) ; } $ this -> request = $ request ; $ this -> parseRequest ( $ request ) ; $ this -> view -> setWebRequest ( $ request ) ; $ this -> model -> onAfterRequestSet ( ) ; $ this -> onStateRestored ( ) ; }
Sets the web request being used to render the tree of leaves.

@param WebRequest $request
Sets the web request being used to render the tree of leaves .