public function status($status = null)
    {
        if ($status !== null) {
            if (!isset($this->statusTexts[$status])) {
                throw new ResponseException('Unsupported status code "' . $status . '"');
            }

            $this->status = (int) $status;

            if ($this->content === null) {
                $this->content = $this->statusTexts[$this->status];
            }
        }

        return $this->status;
    }
public function status($status = null)
    {
        if ($status !== null) {
            if (!isset($this->statusTexts[$status])) {
                throw new ResponseException('Unsupported status code "' . $status . '"');
            }

            $this->status = (int) $status;

            if ($this->content === null) {
                $this->content = $this->statusTexts[$this->status];
            }
        }

        return $this->status;
    }
public function status ( $ status = null ) { if ( $ status !== null ) { if ( ! isset ( $ this -> statusTexts [ $ status ] ) ) { throw new ResponseException ( 'Unsupported status code "' . $ status . '"' ) ; } $ this -> status = ( int ) $ status ; if ( $ this -> content === null ) { $ this -> content = $ this -> statusTexts [ $ this -> status ] ; } } return $ this -> status ; }
Returns response status code

@param int $status

@return int
@throws ResponseException
Returns response status code