|
Squiz Matrix
4.12.2
|
Public Member Functions | |
| HTTP_Response (&$sock, &$listeners) | |
| process ($saveBody=true, $canHaveBody=true) | |
| _processHeader ($header) | |
| _parseCookie ($headervalue) | |
| _readChunked () | |
| _notify ($event, $data=null) | |
| _decodeGzip ($data) | |
Data Fields | |
| $_sock | |
| $_protocol | |
| $_code | |
| $_reason | |
| $_headers | |
| $_cookies | |
| $_body = '' | |
| $_chunkLength = 0 | |
| $_listeners = array() | |
| $_toRead | |
Definition at line 1178 of file Request.php.
| _decodeGzip | ( | $data | ) |
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
private
| string | gzip-encoded data |
Definition at line 1481 of file Request.php.
| _notify | ( | $event, | |
$data = null |
|||
| ) |
Notifies all registered listeners of an event.
| string | Event name |
| mixed | Additional data private |
Definition at line 1462 of file Request.php.
| _parseCookie | ( | $headervalue | ) |
Parse a Set-Cookie header to fill $_cookies array
private
| string | value of Set-Cookie header |
Definition at line 1378 of file Request.php.
| _processHeader | ( | $header | ) |
Processes the response header
private
| string | HTTP header |
Definition at line 1351 of file Request.php.
| _readChunked | ( | ) |
Read a part of response body encoded with chunked Transfer-Encoding
private
Definition at line 1429 of file Request.php.
| HTTP_Response | ( | & | $sock, |
| & | $listeners | ||
| ) |
Constructor
| Net_Socket | socket to read the response from |
| array | listeners attached to request |
Definition at line 1246 of file Request.php.
| process | ( | $saveBody = true, |
|
$canHaveBody = true |
|||
| ) |
Processes a HTTP response
This extracts response code, headers, cookies and decodes body if it was encoded in some way
public
| bool | Whether to store response body in object property, set this to false if downloading a LARGE file and using a Listener. This is assumed to be true if body is gzip-encoded. |
| bool | Whether the response can actually have a message-body. Will be set to false for HEAD requests. |
| PEAR_Error |
Definition at line 1268 of file Request.php.