Definition at line 54 of file Response.php.
HTTP_Request2_Response::__construct |
( |
|
$statusLine, |
|
|
|
$bodyEncoded = true , |
|
|
|
$effectiveUrl = null |
|
) |
| |
Constructor, parses the response status line
- Parameters
-
string | $statusLine | Response status line (e.g. "HTTP/1.1 200 OK") |
bool | $bodyEncoded | Whether body is still encoded by Content-Encoding |
string | $effectiveUrl | Effective URL of the response |
- Exceptions
-
Definition at line 212 of file Response.php.
HTTP_Request2_Response::appendBody |
( |
|
$bodyChunk | ) |
|
Appends a string to the response body
- Parameters
-
string | $bodyChunk | part of response body |
Definition at line 339 of file Response.php.
static HTTP_Request2_Response::decodeDeflate |
( |
|
$data | ) |
|
|
static |
Decodes the message-body encoded by deflate
- Parameters
-
string | $data | deflate-encoded data |
- Returns
- string decoded data
- Exceptions
-
Definition at line 615 of file Response.php.
static HTTP_Request2_Response::decodeGzip |
( |
|
$data | ) |
|
|
static |
Decodes the message-body encoded by gzip
The real decoding work is done by gzinflate() built-in function, this method only parses the header and checks data for compliance with RFC 1952
- Parameters
-
string | $data | gzip-encoded data |
- Returns
- string decoded data
- Exceptions
-
Definition at line 481 of file Response.php.
HTTP_Request2_Response::getBody |
( |
| ) |
|
Returns the body of the response
- Returns
- string
- Exceptions
-
Definition at line 423 of file Response.php.
HTTP_Request2_Response::getCookies |
( |
| ) |
|
Returns cookies set in response
- Returns
- array
Definition at line 412 of file Response.php.
static HTTP_Request2_Response::getDefaultReasonPhrase |
( |
|
$code = null | ) |
|
|
static |
Returns the default reason phrase for the given code or all reason phrases
- Parameters
-
- Returns
- string|array|null Default reason phrase for $code if $code is given (null if no phrase is available), array of all reason phrases if $code is null http://pear.php.net/bugs/18716
Definition at line 194 of file Response.php.
HTTP_Request2_Response::getEffectiveUrl |
( |
| ) |
|
HTTP_Request2_Response::getHeader |
( |
|
$headerName = null | ) |
|
Returns either the named header or all response headers
- Parameters
-
string | $headerName | Name of header to return |
- Returns
- string|array Value of $headerName header (null if header is not present), array of all response headers if $headerName is null
Definition at line 397 of file Response.php.
HTTP_Request2_Response::getReasonPhrase |
( |
| ) |
|
Returns the reason phrase
- Returns
- string
Definition at line 372 of file Response.php.
HTTP_Request2_Response::getStatus |
( |
| ) |
|
Returns the status code
- Returns
- integer
Definition at line 362 of file Response.php.
HTTP_Request2_Response::getVersion |
( |
| ) |
|
Get the HTTP version of the response
- Returns
- string
Definition at line 462 of file Response.php.
HTTP_Request2_Response::isRedirect |
( |
| ) |
|
HTTP_Request2_Response::parseCookie |
( |
|
$cookieString | ) |
|
|
protected |
HTTP_Request2_Response::parseHeaderLine |
( |
|
$headerLine | ) |
|
Parses the line from HTTP response filling $headers array
The method should be called after reading the line from socket or receiving it into cURL callback. Passing an empty string here indicates the end of response headers and triggers additional processing, so be sure to pass an empty string in the end.
- Parameters
-
string | $headerLine | Line from HTTP response |
Definition at line 237 of file Response.php.
HTTP_Request2_Response::$body = '' |
|
protected |
HTTP_Request2_Response::$bodyEncoded |
|
protected |
HTTP_Request2_Response::$code |
|
protected |
HTTP_Request2_Response::$cookies = array() |
|
protected |
HTTP_Request2_Response::$effectiveUrl |
|
protected |
HTTP_Request2_Response::$headers = array() |
|
protected |
HTTP_Request2_Response::$lastHeader = null |
|
protected |
HTTP_Request2_Response::$phrases |
|
staticprotected |
HTTP_Request2_Response::$reasonPhrase |
|
protected |
HTTP_Request2_Response::$version |
|
protected |
The documentation for this class was generated from the following file: