public function setStatusCode($code, $text = null)
    {
        $this->statusCode = (int)$code;

        if ($text) {
            $this->statusText = $text;
        } elseif (isset($this->statusTexts[$code])) {
            $this->statusText = $this->statusTexts[$code];
        }

        return $this;
    }
public function setStatusCode($code, $text = null)
    {
        $this->statusCode = (int)$code;

        if ($text) {
            $this->statusText = $text;
        } elseif (isset($this->statusTexts[$code])) {
            $this->statusText = $this->statusTexts[$code];
        }

        return $this;
    }
public function setStatusCode ( $ code , $ text = null ) { $ this -> statusCode = ( int ) $ code ; if ( $ text ) { $ this -> statusText = $ text ; } elseif ( isset ( $ this -> statusTexts [ $ code ] ) ) { $ this -> statusText = $ this -> statusTexts [ $ code ] ; } return $ this ; }
Set the header status code

@param  int $code The status code
@param  string|null $text The status text
@return $this
Set the header status code