public function getHeader($key = null, $toLower = true)
    {
        if ($key === null) {
            return $this->_headers;
        }
        if ($toLower === true) {
            $key = strtolower($key);
        }
        return isset($this->_headers[$key]) ? $this->_headers[$key] : null;
    }
public function getHeader($key = null, $toLower = true)
    {
        if ($key === null) {
            return $this->_headers;
        }
        if ($toLower === true) {
            $key = strtolower($key);
        }
        return isset($this->_headers[$key]) ? $this->_headers[$key] : null;
    }
public function getHeader ( $ key = null , $ toLower = true ) { if ( $ key === null ) { return $ this -> _headers ; } if ( $ toLower === true ) { $ key = strtolower ( $ key ) ; } return isset ( $ this -> _headers [ $ key ] ) ? $ this -> _headers [ $ key ] : null ; }
Get a http header or all http headers
@param mixed $key the header key to be got, or null to get all headers
@param boolean $toLower convert key to lowercase
@return array|string the header value, or headers array when key is null.
Get a http header or all http headers