From: Michael Wallner Date: Mon, 30 Jan 2006 17:57:26 +0000 (+0000) Subject: update docs X-Git-Tag: RELEASE_0_22_0~9 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ad5c874bc157f84d7e9c2fcd261adcfef4b2efe3;p=m6w6%2Fext-http update docs --- diff --git a/docs/functions.html b/docs/functions.html index 64d9c93..328d337 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -44,35 +44,37 @@ display: block; } .toc { - position: absolute; - top: 10px; - right: 10px; - width: 300px; - height: 95%; - overflow: scroll; - font-size: .9em; - } - body>div.toc { - position: fixed; - } - .toc ul { - padding-left: 15px; - margin-left: 0; - } - .toc li { - padding: 0; - margin: 0; - } + position: absolute; + top: 10px; + right: 10px; + width: 300px; + height: 95%; + overflow: scroll; + font-size: .9em; + } + body>div.toc { + position: fixed; + } + .toc ul { + padding-left: 15px; + margin-left: 0; + } + .toc li { + padding: 0; + margin: 0; + } + .tocfile { + font-weight: bold; + }

http_functions.c

string http_date([int timestamp])

Compose a valid HTTP date regarding RFC 822/1123
looking like: "Wed, 22 Dec 2004 11:34:47 GMT"

-

Takes an optional unix timestamp as parameter.
-
-Returns the HTTP date as string.

-

string http_build_url(mixed url[, mixed parts[, array &new_url]])

+

Accepts an optional unix timestamp as parameter.

+

Returns the HTTP date as string.

+

string http_build_url(mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]])

Returns the new URL as string on success or FALSE on failure.

string http_negotiate_language(array supported[, array &result])

This function negotiates the clients preferred language based on its
@@ -199,9 +201,11 @@ be treated with http_build_query() and the session identification will be append if session is true.

The HTTP response code will be set according to status.
You can use one of the following constants for convenience:
- - HTTP_REDIRECT 302 Found
+ - HTTP_REDIRECT 302 Found for GET/HEAD, else 303 See Other
- HTTP_REDIRECT_PERM 301 Moved Permanently
+ - HTTP_REDIRECT_FOUND 302 Found
- HTTP_REDIRECT_POST 303 See Other
+ - HTTP_REDIRECT_PROXY 305 Use Proxy
- HTTP_REDIRECT_TEMP 307 Temporary Redirect

Please see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
for which redirect response code to use in which situation.

@@ -256,7 +260,13 @@ several consecutive HTTP messages.

Returns an associative array of incoming request headers.

string http_get_request_body(void)

Get the raw request body (e.g. POST or PUT data).

-

Returns NULL when using the CLI SAPI.

+

This function can not be used after http_get_request_body_stream()
+if the request method was another than POST.

+

Returns the raw request body as string on success or NULL on failure.

+

resource http_get_request_body_stream(void)

+

Create a stream to read the raw request body (e.g. POST or PUT data).

+

This function can only be used once if the request method was another than POST.

+

Returns the raw request body as stream on success or NULL on failure.

bool http_match_request_header(string header, string value[, bool match_case = false])

Match an incoming HTTP header.

Expects two string parameters representing the header name (case-insensitive)
@@ -399,6 +409,7 @@ all supported features.

Returns the final part of deflated data.


http_inflatestream_object.c

+

HttpInflateStream

string HttpInflateStream::update(string data)

Passes more data through the inflate stream.

Expects a string parameter containing (a part of) the data to inflate.

@@ -419,10 +430,10 @@ consecutive HTTP messages. The constructed object will actually
represent the *last* message of the passed string. If there were
prior messages, those can be accessed by HttpMessage::getParentMessage().

Throws HttpMalformedHeaderException.

-

static HttpMessage HttpMessage::fromString(string raw_message)

+

static HttpMessage HttpMessage::fromString(string raw_message[, string class_name = "HttpMessage"])

Create an HttpMessage object from a string. Kind of a static constructor.

Expects a string parameter containing a sinlge or several consecutive
-HTTP messages.

+HTTP messages. Accepts an optionsl string parameter specifying the class to use.

Returns an HttpMessage object on success or NULL on failure.

Throws HttpMalformedHeadersException.

string HttpMessage::getBody()

@@ -498,6 +509,10 @@ This provides limited functionality compared to HttpRequest and HttpResponse.

Accepts a bool parameter which specifies whether the returned string
should also contain any parent messages.

Returns the full message as string.

+

HttpRequest|HttpResponse HttpMessage::toMessageTypeObject(void)

+

Creates an object regarding to the type of the message.

+

Returns either an HttpRequest or HttpResponse object on success, or NULL on failure.

+

Throws HttpRuntimeException, HttpMessageTypeException, HttpHeaderException.

int HttpMessage::count()

Implements Countable.

Returns the number of parent messages + 1.

@@ -507,6 +522,41 @@ should also contain any parent messages.

void HttpMessage::unserialize(string serialized)

Implements Serializable.

Re-constructs the HttpMessage based upon the serialized string.

+

HttpMessage HttpMessage::detach(void)

+

Returns a clone of an HttpMessage object detached from any parent messages.

+

void HttpMessage::prepend(HttpMessage message)

+

Prepends message(s) to the HTTP message.

+

Expects an HttpMessage object as parameter.

+

void HttpMessage::rewind(void)

+

Implements Iterator.

+

bool HttpMessage::valid(void)

+

Implements Iterator.

+

void HttpMessage::next(void)

+

Implements Iterator.

+

int HttpMessage::key(void)

+

Implements Iterator.

+

HttpMessage HttpMessage::current(void)

+

Implements Iterator.

+
+

http_querystring_object.c

+

HttpQueryString

+

void HttpQueryString::__construct([bool global = true])

+

Creates a new HttpQueryString object instance.
+Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE.

+

string HttpQueryString::__toString()

+

Returns the string representation.

+

mixed HttpQueryString::get([string key[, mixed type = 0[, mixed defval = NULL[, bool delete = false]]]])

+

Get (part of) the query string.

+

The type parameter is either one of the HttpQueryString::TYPE_* constants or a type abbreviation like
+"b" for bool, "i" for int, "f" for float, "s" for string, "a" for array and "o" for a stdClass object.

+

string HttpQueryString::set(string name, mixed value)

+

Set a query string entry.

+

string HttpQueryString::del(mixed param)

+

Deletes entry/entries from the query string.

+

string HttpQueryString::mod(array params)

+

Modifies the query string according to params. NULL values will unset the variable.

+

HttpQueryString HttpQueryString::getInstance([bool global = true])

+

Get a single instance (differentiates between the global setting).


http_request_object.c

HttpRequest

@@ -831,6 +881,7 @@ HttpRequestPool object.

already have finished their work.


http_response_object.c

+

HttpResponse

static bool HttpResponse::setHeader(string name, mixed value[, bool replace = true])

Send an HTTP header.

Expects a string parameter containing the name of the header and a mixed
@@ -987,7 +1038,7 @@ http.cache_log is set.


Table of Contents
-

Generated at: Tue, 03 Jan 2006 20:04:51 +0100

+

Generated at: Mon, 30 Jan 2006 18:56:09 +0100