public function fromRequest(Request $request)
    {
        $this->setBaseUrl($request->getBaseUrl());
        $this->setPathInfo($request->getPathInfo());
        $this->setMethod($request->getMethod());
        $this->setHost($request->getHost());
        $this->setScheme($request->getScheme());
        $this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort());
        $this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort);
        $this->setQueryString($request->server->get('QUERY_STRING', ''));

        return $this;
    }
public function fromRequest(Request $request)
    {
        $this->setBaseUrl($request->getBaseUrl());
        $this->setPathInfo($request->getPathInfo());
        $this->setMethod($request->getMethod());
        $this->setHost($request->getHost());
        $this->setScheme($request->getScheme());
        $this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort());
        $this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort);
        $this->setQueryString($request->server->get('QUERY_STRING', ''));

        return $this;
    }
public function fromRequest ( Request $ request ) { $ this -> setBaseUrl ( $ request -> getBaseUrl ( ) ) ; $ this -> setPathInfo ( $ request -> getPathInfo ( ) ) ; $ this -> setMethod ( $ request -> getMethod ( ) ) ; $ this -> setHost ( $ request -> getHost ( ) ) ; $ this -> setScheme ( $ request -> getScheme ( ) ) ; $ this -> setHttpPort ( $ request -> isSecure ( ) ? $ this -> httpPort : $ request -> getPort ( ) ) ; $ this -> setHttpsPort ( $ request -> isSecure ( ) ? $ request -> getPort ( ) : $ this -> httpsPort ) ; $ this -> setQueryString ( $ request -> server -> get ( 'QUERY_STRING' , '' ) ) ; return $ this ; }
Updates the RequestContext information based on a HttpFoundation Request.

@return $this
Updates the RequestContext information based on a HttpFoundation Request .