original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Sets the web request being used to render the tree of leaves.
  
  @param WebRequest $request
docstring_tokens: Sets the web request being used to render the tree of leaves .