public function getHeader($headerName = null)
    {
        if (null === $headerName) {
            return $this->headers;
        } else {
            $headerName = strtolower($headerName);
            return isset($this->headers[$headerName])? $this->headers[$headerName]: null;
        }
    }
public function getHeader($headerName = null)
    {
        if (null === $headerName) {
            return $this->headers;
        } else {
            $headerName = strtolower($headerName);
            return isset($this->headers[$headerName])? $this->headers[$headerName]: null;
        }
    }
public function getHeader ( $ headerName = null ) { if ( null === $ headerName ) { return $ this -> headers ; } else { $ headerName = strtolower ( $ headerName ) ; return isset ( $ this -> headers [ $ headerName ] ) ? $ this -> headers [ $ headerName ] : null ; } }
Returns either the named header or all response headers

@param string $headerName Name of header to return

@return   string|array    Value of $headerName header (null if header is
not present), array of all response headers if
$headerName is null
Returns either the named header or all response headers