X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Ffunctions.html;h=b815071d31a3cf5b33523658f2e578956c086127;hb=edc84b40eb2c5be04492fa98fec5833a030782eb;hp=e1329bb6d9034cea8ed295454eae73dda45a755c;hpb=7ba82df3144551af4182de7e515f955b9b1a68a9;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index e1329bb..b815071 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -113,6 +113,19 @@ if none match.
<?phpThis function negotiates the clients preferred content type based on its
+Accept HTTP header. The qualifier is recognized and content types
+without qualifier are rated highest.
Expects an array as parameter cotaining the supported content types as values.
+If the optional second parameter is supplied, it will be filled with an
+array containing the negotiation results.
Returns the negotiated content type or the default content type
+(i.e. first array entry) if none match.
Example:
+
+<?php
$ctypes = array('application/xhtml+xml', 'text/html');
http_send_content_type(http_negotiate_content_type($ctypes));
?>
+
Send HTTP status code.
Expects an HTTP status code as parameter.
@@ -384,8 +397,6 @@ all supported features that depend on external libraries. and SSL requests can be issuedReturns the full message as string.
+Implements Countable.
+Returns the number of parent messages + 1.
+Implements Serializable.
+Returns the serialized representation of the HttpMessage.
+Implements Serializable.
+Re-constructs the HttpMessage based upon the serialized string.
Note that the internal request message is immutable, that means that the
+request message received through HttpRequest::getRequestMessage() will
+always look the same for the same request, regardless of any changes you
+may have made to the returned object.
Throws HttpMalformedHeadersException, HttpEncodingException.
Get all sent requests and received responses as an HttpMessage object.
If you don't want to record history at all, set the instance variable
@@ -705,12 +730,18 @@ HttpRequest::$recoedHistory to FALSE.
The object references the last received response, use HttpMessage::getParentMessage()
to access the data of previously sent requests and received responses.
Throws HttpMalformedHeaderException.
+Note that the internal history is immutable, that means that any changes
+you make the the message list won't affect a history message list newly
+created by another call to HttpRequest::getHistory().
Throws HttpMalformedHeaderException, HttpEncodingException.
Clear the history.
Send the HTTP request.
Returns the received response as HttpMessage object.
+NOTE: While an exception may be thrown, the transfer could have succeeded
+at least partially, so you might want to check the return values of various
+HttpRequest::getResponse*() methods.
Throws HttpRuntimeException, HttpRequestException,
HttpMalformedHeaderException, HttpEncodingException.
GET example:
@@ -778,6 +809,9 @@ HttpRequestPoolException, HttpMalformedHeaderException.Implements Iterator::next().
void HttpRequestPool::rewind()
Implements Iterator::rewind().
+int HttpRequestPool::count()
+Implements Countable.
+Returns the number of attached HttpRequest objects.
array HttpRequestPool::getAttachedRequests()
Get attached HttpRequest objects.
Returns an array containing all currently attached HttpRequest objects.
@@ -953,6 +987,8 @@ http.cache_log is set.
Generated at: Fri, 04 Nov 2005 12:29:06 +0100
+Generated at: Mon, 21 Nov 2005 16:56:18 +0100