|
ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Collaboration diagram for HTTP_Response:Public Member Functions | |
| HTTP_Response (&$sock, &$listeners) | |
| Constructor. More... | |
| process ($saveBody=true, $canHaveBody=true) | |
| Processes a HTTP response. More... | |
| _processHeader ($header) | |
| Processes the response header. More... | |
| _parseCookie ($headervalue) | |
| Parse a Set-Cookie header to fill $_cookies array. More... | |
| _readChunked () | |
| Read a part of response body encoded with chunked Transfer-Encoding. More... | |
| _notify ($event, $data=null) | |
| Notifies all registered listeners of an event. More... | |
| _decodeGzip ($data) | |
| Decodes the message-body encoded by gzip. More... | |
Data Fields | |
| $_sock | |
| $_protocol | |
| $_code | |
| $_reason | |
| $_headers | |
| $_cookies | |
| $_body = '' | |
| $_chunkLength = 0 | |
| $_listeners = array() | |
| $_toRead | |
Definition at line 1130 of file Request.php.
| HTTP_Response::_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
@access private
| string | gzip-encoded data |
Definition at line 1433 of file Request.php.
References $data, HTTP_REQUEST_ERROR_GZIP_CRC, HTTP_REQUEST_ERROR_GZIP_DATA, HTTP_REQUEST_ERROR_GZIP_METHOD, HTTP_REQUEST_ERROR_GZIP_READ, and PEAR\raiseError().
Referenced by process().
Here is the call graph for this function:
Here is the caller graph for this function:| HTTP_Response::_notify | ( | $event, | |
$data = null |
|||
| ) |
Notifies all registered listeners of an event.
| string | Event name |
| mixed | Additional data @access private |
Definition at line 1414 of file Request.php.
References $data.
Referenced by process().
Here is the caller graph for this function:| HTTP_Response::_parseCookie | ( | $headervalue | ) |
Parse a Set-Cookie header to fill $_cookies array.
@access private
| string | value of Set-Cookie header |
Definition at line 1330 of file Request.php.
Referenced by _processHeader().
Here is the caller graph for this function:| HTTP_Response::_processHeader | ( | $header | ) |
Processes the response header.
@access private
| string | HTTP header |
Definition at line 1303 of file Request.php.
References $header, and _parseCookie().
Referenced by process().
Here is the call graph for this function:
Here is the caller graph for this function:| HTTP_Response::_readChunked | ( | ) |
Read a part of response body encoded with chunked Transfer-Encoding.
@access private
Definition at line 1381 of file Request.php.
References $data.
Referenced by process().
Here is the caller graph for this function:| HTTP_Response::HTTP_Response | ( | & | $sock, |
| & | $listeners | ||
| ) |
Constructor.
| Net_Socket | socket to read the response from |
| array | listeners attached to request |
Definition at line 1198 of file Request.php.
| HTTP_Response::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
@access 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 1220 of file Request.php.
References $_toRead, $data, $header, _decodeGzip(), _notify(), _processHeader(), _readChunked(), HTTP_REQUEST_ERROR_RESPONSE, PEAR\isError(), and PEAR\raiseError().
Here is the call graph for this function:| HTTP_Response::$_body = '' |
Definition at line 1172 of file Request.php.
| HTTP_Response::$_chunkLength = 0 |
Definition at line 1178 of file Request.php.
| HTTP_Response::$_code |
Definition at line 1148 of file Request.php.
| HTTP_Response::$_cookies |
Definition at line 1166 of file Request.php.
| HTTP_Response::$_headers |
Definition at line 1160 of file Request.php.
| HTTP_Response::$_listeners = array() |
Definition at line 1184 of file Request.php.
| HTTP_Response::$_protocol |
Definition at line 1142 of file Request.php.
| HTTP_Response::$_reason |
Definition at line 1154 of file Request.php.
| HTTP_Response::$_sock |
Definition at line 1136 of file Request.php.
| HTTP_Response::$_toRead |
Definition at line 1190 of file Request.php.
Referenced by process().