PHP Class Horde_Http_Response_Base, horde

Author: Chuck Hagenbuch ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$code integer HTTP response code.
$headers array Response headers.
$httpVersion float HTTP protocol version that was used.
$uri string Fetched URI.

Protected Properties

Property Type Description
$_headers Horde_Support_CaseInsensitiveArray Case-insensitive list of headers.

Public Methods

Method Description
getBody ( ) : string Returns the body of the HTTP response.
getHeader ( string $header ) : string Returns the value of a single response header.
getStream ( ) Returns a stream pointing to the response body that can be used with all standard PHP stream functions.

Protected Methods

Method Description
_parseHeaders ( array $headers ) : array Parses an array of response headers, mindful of line continuations, etc.

Method Details

_parseHeaders() protected method

Parses an array of response headers, mindful of line continuations, etc.
protected _parseHeaders ( array $headers ) : array
$headers array
return array

getBody() abstract public method

Returns the body of the HTTP response.
abstract public getBody ( ) : string
return string HTTP response body.

getHeader() public method

Returns the value of a single response header.
public getHeader ( string $header ) : string
$header string Header name to get ('Content-Type', 'Content-Length', etc.).
return string HTTP header value.

getStream() public method

Returns a stream pointing to the response body that can be used with all standard PHP stream functions.
public getStream ( )

Property Details

$_headers protected_oe property

Case-insensitive list of headers.
protected Horde_Support_CaseInsensitiveArray $_headers
return Horde_Support_CaseInsensitiveArray

$code public_oe property

HTTP response code.
public int $code
return integer

$headers public_oe property

Response headers.
public array $headers
return array

$httpVersion public_oe property

HTTP protocol version that was used.
public float $httpVersion
return float

$uri public_oe property

Fetched URI.
public string $uri
return string