public function init()
    {

        // init body stream
        $this->bodyStream = '';

        // init exception
        $this->exception = null;

        // init default response properties
        $this->statusCode = 200;
        $this->version = 'HTTP/1.1';
        $this->statusReasonPhrase = "OK";
        $this->mimeType = "text/plain";
        $this->state = HttpResponseStates::INITIAL;

        // initialize cookies and headers
        $this->cookies = array();
        $this->headers = array();

        // initialize the default headers
        $this->initDefaultHeaders();
    }
public function init()
    {

        // init body stream
        $this->bodyStream = '';

        // init exception
        $this->exception = null;

        // init default response properties
        $this->statusCode = 200;
        $this->version = 'HTTP/1.1';
        $this->statusReasonPhrase = "OK";
        $this->mimeType = "text/plain";
        $this->state = HttpResponseStates::INITIAL;

        // initialize cookies and headers
        $this->cookies = array();
        $this->headers = array();

        // initialize the default headers
        $this->initDefaultHeaders();
    }
public function init ( ) { // init body stream $ this -> bodyStream = '' ; // init exception $ this -> exception = null ; // init default response properties $ this -> statusCode = 200 ; $ this -> version = 'HTTP/1.1' ; $ this -> statusReasonPhrase = "OK" ; $ this -> mimeType = "text/plain" ; $ this -> state = HttpResponseStates :: INITIAL ; // initialize cookies and headers $ this -> cookies = array ( ) ; $ this -> headers = array ( ) ; // initialize the default headers $ this -> initDefaultHeaders ( ) ; }
Initialises the response object to default properties.

@return void
Initialises the response object to default properties .