public function init()
    {

        // reset the servlet request
        $httpRequest = $this->getHttpRequest();

        // initialize the parts
        foreach ($httpRequest->getParts() as $part) {
            $this->addPart(Part::fromHttpRequest($part));
        }

        // set the body content if we can find one
        if ($httpRequest->getHeader(HttpProtocol::HEADER_CONTENT_LENGTH) > 0) {
            $this->setBodyStream($httpRequest->getBodyContent());
        }

        // copy server variables to members
        $this->setServerName($this->getServerVar(ServerVars::SERVER_NAME));
        $this->setQueryString($this->getServerVar(ServerVars::QUERY_STRING));
        $this->setRequestUri($this->getServerVar(ServerVars::X_REQUEST_URI));
        $this->setDocumentRoot($this->getServerVar(ServerVars::DOCUMENT_ROOT));
        $this->setRequestUrl($this->getServerVar(ServerVars::HTTP_HOST) . $this->getServerVar(ServerVars::X_REQUEST_URI));
    }
public function init()
    {

        // reset the servlet request
        $httpRequest = $this->getHttpRequest();

        // initialize the parts
        foreach ($httpRequest->getParts() as $part) {
            $this->addPart(Part::fromHttpRequest($part));
        }

        // set the body content if we can find one
        if ($httpRequest->getHeader(HttpProtocol::HEADER_CONTENT_LENGTH) > 0) {
            $this->setBodyStream($httpRequest->getBodyContent());
        }

        // copy server variables to members
        $this->setServerName($this->getServerVar(ServerVars::SERVER_NAME));
        $this->setQueryString($this->getServerVar(ServerVars::QUERY_STRING));
        $this->setRequestUri($this->getServerVar(ServerVars::X_REQUEST_URI));
        $this->setDocumentRoot($this->getServerVar(ServerVars::DOCUMENT_ROOT));
        $this->setRequestUrl($this->getServerVar(ServerVars::HTTP_HOST) . $this->getServerVar(ServerVars::X_REQUEST_URI));
    }
public function init ( ) { // reset the servlet request $ httpRequest = $ this -> getHttpRequest ( ) ; // initialize the parts foreach ( $ httpRequest -> getParts ( ) as $ part ) { $ this -> addPart ( Part :: fromHttpRequest ( $ part ) ) ; } // set the body content if we can find one if ( $ httpRequest -> getHeader ( HttpProtocol :: HEADER_CONTENT_LENGTH ) > 0 ) { $ this -> setBodyStream ( $ httpRequest -> getBodyContent ( ) ) ; } // copy server variables to members $ this -> setServerName ( $ this -> getServerVar ( ServerVars :: SERVER_NAME ) ) ; $ this -> setQueryString ( $ this -> getServerVar ( ServerVars :: QUERY_STRING ) ) ; $ this -> setRequestUri ( $ this -> getServerVar ( ServerVars :: X_REQUEST_URI ) ) ; $ this -> setDocumentRoot ( $ this -> getServerVar ( ServerVars :: DOCUMENT_ROOT ) ) ; $ this -> setRequestUrl ( $ this -> getServerVar ( ServerVars :: HTTP_HOST ) . $ this -> getServerVar ( ServerVars :: X_REQUEST_URI ) ) ; }
Initializes the servlet request with the data from the injected HTTP request instance.

@return void
Initializes the servlet request with the data from the injected HTTP request instance .