src/Net/HTTP/Response.php
public function getHeader( $key, $first = NULL )
	{
		$fields	= $this->headers->getFieldsByName( $key );											//  get all header fields with this header name
		if( !$first )																				//  all header fields shall be returned
			return $fields;																			//  return all header fields
		if( $fields )																				//  otherwise: header fields (atleat one) are set
			return $fields[0];																		//  return first header field
		return new Net_HTTP_Header_Field( $key, NULL );												//  otherwise: return empty fake header field
	}
public function getHeader( $key, $first = NULL )
	{
		$fields	= $this->headers->getFieldsByName( $key );											//  get all header fields with this header name
		if( !$first )																				//  all header fields shall be returned
			return $fields;																			//  return all header fields
		if( $fields )																				//  otherwise: header fields (atleat one) are set
			return $fields[0];																		//  return first header field
		return new Net_HTTP_Header_Field( $key, NULL );												//  otherwise: return empty fake header field
	}
public function getHeader ( $ key , $ first = NULL ) { $ fields = $ this -> headers -> getFieldsByName ( $ key ) ; //  get all header fields with this header name if ( ! $ first ) //  all header fields shall be returned return $ fields ; //  return all header fields if ( $ fields ) //  otherwise: header fields (atleat one) are set return $ fields [ 0 ] ; //  return first header field return new Net_HTTP_Header_Field ( $ key , NULL ) ; //  otherwise: return empty fake header field }
Returns response headers.
@access		public
@param		string		$string			Header name
@param		bool		$first			Flag: return first header only
@return		array|Net_HTTP_Header_Field		List of header fields or only one header field if requested so
Returns response headers .