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();
    }