HTTP_Request| Variable Summary | |
|---|---|
| mixed | $_allowRedirects |
| mixed | $_body |
| mixed | $_bodyDisallowed |
| mixed | $_http |
| mixed | $_listeners |
| mixed | $_maxRedirects |
| mixed | $_method |
| mixed | $_pass |
| mixed | $_postData |
| mixed | $_postFiles |
| mixed | $_proxy_host |
| mixed | $_proxy_pass |
| mixed | $_proxy_port |
| mixed | $_proxy_user |
| mixed | $_readTimeout |
| mixed | $_redirects |
| mixed | $_requestHeaders |
| mixed | $_response |
| mixed | $_saveBody |
| mixed | $_sock |
| mixed | $_socketOptions |
| mixed | $_timeout |
| mixed | $_url |
| mixed | $_useBrackets |
| mixed | $_user |
| Method Summary | |
|---|---|
| HTTP_Request | HTTP_Request ([ $url = ''] , [ $params = array()] ) |
| void | addCookie ( $name, $value) |
| void | addFile ( $inputName, $fileName, [ $contentType = 'application/octet-stream'] ) |
| void | addHeader ( $name, $value) |
| void | addPostData ( $name, $value, [ $preencoded = false] ) |
| void | addQueryString ( $name, $value, [ $preencoded = false] ) |
| void | addRawPostData ( $postdata, [ $preencoded = true] ) |
| void | addRawQueryString ( $querystring, [ $preencoded = true] ) |
| void | attach ( &$listener) |
| void | clearCookies () |
| void | clearPostData () |
| void | detach ( &$listener) |
| void | disconnect () |
| void | getResponseBody () |
| void | getResponseCode () |
| void | getResponseCookies () |
| void | getResponseHeader ([ $headername = null] ) |
| void | getUrl ( $url) |
| void | removeHeader ( $name) |
| void | reset ( $url, [ $params = array()] ) |
| void | sendRequest ([ $saveBody = true] ) |
| void | setBasicAuth ( $user, $pass) |
| void | setBody ( $body) |
| void | setHttpVer ( $http) |
| void | setMethod ( $method) |
| void | setProxy ( $host, [ $port = 8080] , [ $user = null] , [ $pass = null] ) |
| void | setURL ( $url) |
| void | _arrayMapRecursive ( $callback, $value) |
| void | _buildRequest () |
| void | _flattenArray ( $name, $values) |
| void | _generateHostHeader () |
| void | _notify ( $event, [ $data = null] ) |
* Whether to allow redirects * @var boolean
* Request body * @var string
* A list of methods that MUST NOT have a request body, per RFC 2616 * @var array
* HTTP Version * @var string
* Attached listeners * @var array
* Maximum redirects allowed * @var integer
* Type of request * @var string
* Basic Auth Password * @var string
* Post data * @var array
* Files to post * @var array
* Proxy server * @var string
* Proxy password * @var string
* Proxy port * @var integer
* Proxy username * @var string
* Timeout for reading from socket (array(seconds, microseconds)) * @var array
* Current number of redirects * @var integer
* Request headers * @var array
* HTTP_Response object * @var object HTTP_Response
* Whether to save response body in response object property * @var bool
* Socket object * @var object Net_Socket
* Options to pass to Net_Socket::connect. See stream_context_create * @var array
* Connection timeout. * @var float
* Instance of Net_URL * @var object Net_URL
* Whether to append brackets [] to array variables * @var bool
* Basic Auth Username * @var string
* Constructor * * Sets up the object * @param string The url to fetch/access * @param array Associative array of parameters which can have the following keys: *
* Appends a cookie to "Cookie:" header * * @param string $name cookie name * @param string $value cookie value * @access public
* Adds a file to upload * * This also changes content-type to 'multipart/form-data' for proper upload * * @access public * @param string name of file-upload field * @param mixed file name(s) * @param mixed content-type(s) of file(s) being uploaded * @return bool true on success * @throws PEAR_Error
* Adds a request header * * @param string Header name * @param string Header value * @access public
* Adds postdata items * * @param string Post data name * @param string Post data value * @param bool Whether data is already urlencoded or not, default = not * @access public
* Adds a querystring parameter * * @param string Querystring parameter name * @param string Querystring parameter value * @param bool Whether the value is already urlencoded or not, default = not * @access public
* Adds raw postdata (DEPRECATED) * * @param string The data * @param bool Whether data is preencoded or not, default = already encoded * @access public * @deprecated deprecated since 1.3.0, method setBody() should be used instead
* Sets the querystring to literally what you supply * * @param string The querystring data. Should be of the format foo=bar&x=y etc * @param bool Whether data is already urlencoded or not, default = already encoded * @access public
* Adds a Listener to the list of listeners that are notified of * the object's events * * @param object HTTP_Request_Listener instance to attach * @return boolean whether the listener was successfully attached * @access public
* Clears any cookies that have been added (DEPRECATED). * * Useful for multiple request scenarios * * @access public * @deprecated deprecated since 1.2
* Clears any postdata that has been added (DEPRECATED). * * Useful for multiple request scenarios. * * @access public * @deprecated deprecated since 1.2
* Removes a Listener from the list of listeners * * @param object HTTP_Request_Listener instance to detach * @return boolean whether the listener was successfully detached * @access public
* Disconnect the socket, if connected. Only useful if using Keep-Alive. * * @access public
* Returns the body of the response * * @access public * @return mixed response body, false if not set
* Returns the response code * * @access public * @return mixed Response code, false if not set
* Returns cookies set in response * * @access public * @return mixed array of response cookies, false if none are present
* Returns either the named header or all if no name given * * @access public * @param string The header name to return, do not set to get all headers * @return mixed either the value of $headername (false if header is not present) * or an array of all headers
* Returns the current request URL * * @return string Current request URL * @access public
* Removes a request header * * @param string Header name to remove * @access public
* Resets the object to its initial state (DEPRECATED). * Takes the same parameters as the constructor. * * @param string $url The url to be requested * @param array $params Associative array of parameters * (see constructor for details) * @access public * @deprecated deprecated since 1.2, call the constructor if this is necessary
* Sends the request * * @access public * @param bool Whether to store response body in Response object property, * set this to false if downloading a LARGE file and using a Listener * @return mixed PEAR error on error, true otherwise
* Sets basic authentication parameters * * @param string Username * @param string Password
* Sets the request body (for POST, PUT and similar requests) * * @param string Request body * @access public
* Sets the HTTP version to use, 1.0 or 1.1 * * @param string Version to use. Use the defined constants for this * @access public
* Sets the method to be used, GET, POST etc. * * @param string Method to use. Use the defined constants for this * @access public
* Sets a proxy to be used * * @param string Proxy host * @param int Proxy port * @param string Proxy username * @param string Proxy password * @access public
* Sets the URL to be requested * * @param string The url to be requested * @access public
* Recursively applies the callback function to the value * * @param mixed Callback function * @param mixed Value to process * @access private * @return mixed Processed value
* Builds the request string * * @access private * @return string The request string
* Helper function to change the (probably multidimensional) associative array * into the simple one. * * @param string name for item * @param mixed item's values * @return array array with the following items: array('item name', 'item value');
* Generates a Host header for HTTP/1.1 requests * * @access private * @return string
* Notifies all registered listeners of an event. * * Events sent by HTTP_Request object * - 'connect': on connection to server * - 'sentRequest': after the request was sent * - 'disconnect': on disconnection from server * * Events sent by HTTP_Response object * - 'gotHeaders': after receiving response headers (headers are passed in $data) * - 'tick': on receiving a part of response body (the part is passed in $data) * - 'gzTick': on receiving a gzip-encoded part of response body (ditto) * - 'gotBody': after receiving the response body (passes the decoded body in $data if it was gzipped) * * @param string Event name * @param mixed Additional data * @access private
Documentation generated on 2009-01-06 at 01:01 by phpDocumentor 1.4.1