branch off v1 as R_1_7
[m6w6/ext-http] / docs / functions.html
index 25b14cc58520389e19bc74f074de10c25d7fde1b..743a151fc7ad938c919560bdb374cfd19c912321 100644 (file)
@@ -513,6 +513,9 @@ HTTP messages.  Accepts an optional string parameter specifying the class to use
 <p>Set the body of the HttpMessage.<br />
 NOTE: Don't forget to update any headers accordingly.</p>
 <p>Expects a string parameter containing the new body of the message.</p>
+<h3 id="HttpMessage_getHeader">string HttpMessage::getHeader(string header)</h3>
+<p>Get message header.</p>
+<p>Returns the header value on success or NULL if the header does not exist.</p>
 <h3 id="HttpMessage_getHeaders">array HttpMessage::getHeaders()</h3>
 <p>Get Message Headers.</p>
 <p>Returns an associative array containing the messages HTTP headers.</p>
@@ -576,6 +579,13 @@ HttpMessage::TYPE_REQUEST or supplied URL was empty.</p>
 <p>Set the HTTP Protocol version of the Message.</p>
 <p>Expects a string parameter containing the HTTP protocol version.</p>
 <p>Returns TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).</p>
+<h3 id="HttpMessage_guessContentType">string HttpMessage::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])</h3>
+<p>Attempts to guess the content type of supplied payload through libmagic.</p>
+<p>Expects a string parameter specifying the magic.mime database to use.<br />
+Additionally accepts an optional int parameter, being flags for libmagic.</p>
+<p>Returns the guessed content type on success, or FALSE on failure.</p>
+<p>Throws HttpRuntimeException, HttpInvalidParamException <br />
+if http.only_exceptions is TRUE.</p>
 <h3 id="HttpMessage_getParentMessage">HttpMessage HttpMessage::getParentMessage()</h3>
 <p>Get parent Message.</p>
 <p>Returns the parent HttpMessage on success, or NULL if there's none.</p>
@@ -637,6 +647,12 @@ Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE.</
 "b" for bool, "i" for int, "f" for float, "s" for string, "a" for array and "o" for a stdClass object.</p>
 <h3 id="HttpQueryString_set">string HttpQueryString::set(mixed params)</h3>
 <p>Set query string entry/entries. NULL values will unset the variable.</p>
+<h3 id="HttpQueryString_mod">HttpQueryString HttpQueryString::mod(mixed params)</h3>
+<p>Copies the query string object and sets provided params at the clone.<br />
+This is basically shorthand for:</p><pre><blockquote><code><span style="color: #000000"><br />
+<span style="color: #0000BB">&lt;?php<br />$newQS&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpQueryString</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$oldQS</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$newQS</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #0000BB">$other_params</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span><br />
+</span></code></blockquote></p>
+<p></pre></p>
 <h3 id="HttpQueryString_singleton">static HttpQueryString HttpQueryString::singleton([bool global = true])</h3>
 <p>Get a single instance (differentiates between the global setting).</p>
 <h3 id="HttpQueryString_xlate">bool HttpQueryString::xlate(string ie, string oe)</h3>
@@ -647,6 +663,14 @@ WARNING: Don't use any character set that can contain NUL bytes like UTF-16.</p>
 <p>Implements Serializable.</p>
 <h3 id="HttpQueryString_unserialize">void HttpQueryString::unserialize(string serialized)</h3>
 <p>Implements Serializable.</p>
+<h3 id="HttpQueryString_offsetGet">mixed HttpQueryString::offsetGet(string offset)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetSet">void HttpQueryString::offsetSet(string offset, mixed value)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetExists">bool HttpQueryString::offsetExists(string offset)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetUnset">void HttpQueryString::offsetUnset(string offset)</h3>
+<p>Implements ArrayAccess.</p>
 <hr noshade>
 <h1 id="http_request_object.c">http_request_object.c</h1>
 <h2 id="HttpRequest" class="o">HttpRequest</h2>
@@ -1274,6 +1298,7 @@ http.cache_log is set.</p>
 <li><a href="#HttpMessage_fromString">HttpMessage::fromString()</a></li>
 <li><a href="#HttpMessage_getBody">HttpMessage::getBody()</a></li>
 <li><a href="#HttpMessage_setBody">HttpMessage::setBody()</a></li>
+<li><a href="#HttpMessage_getHeader">HttpMessage::getHeader()</a></li>
 <li><a href="#HttpMessage_getHeaders">HttpMessage::getHeaders()</a></li>
 <li><a href="#HttpMessage_setHeaders">HttpMessage::setHeaders()</a></li>
 <li><a href="#HttpMessage_addHeaders">HttpMessage::addHeaders()</a></li>
@@ -1289,6 +1314,7 @@ http.cache_log is set.</p>
 <li><a href="#HttpMessage_setRequestUrl">HttpMessage::setRequestUrl()</a></li>
 <li><a href="#HttpMessage_getHttpVersion">HttpMessage::getHttpVersion()</a></li>
 <li><a href="#HttpMessage_setHttpVersion">HttpMessage::setHttpVersion()</a></li>
+<li><a href="#HttpMessage_guessContentType">HttpMessage::guessContentType()</a></li>
 <li><a href="#HttpMessage_getParentMessage">HttpMessage::getParentMessage()</a></li>
 <li><a href="#HttpMessage_send">HttpMessage::send()</a></li>
 <li><a href="#HttpMessage_toString">HttpMessage::toString()</a></li>
@@ -1314,10 +1340,15 @@ http.cache_log is set.</p>
 <li><a href="#HttpQueryString_toArray">HttpQueryString::toArray()</a></li>
 <li><a href="#HttpQueryString_get">HttpQueryString::get()</a></li>
 <li><a href="#HttpQueryString_set">HttpQueryString::set()</a></li>
+<li><a href="#HttpQueryString_mod">HttpQueryString::mod()</a></li>
 <li><a href="#HttpQueryString_singleton">HttpQueryString::singleton()</a></li>
 <li><a href="#HttpQueryString_xlate">HttpQueryString::xlate()</a></li>
 <li><a href="#HttpQueryString_serialize">HttpQueryString::serialize()</a></li>
 <li><a href="#HttpQueryString_unserialize">HttpQueryString::unserialize()</a></li>
+<li><a href="#HttpQueryString_offsetGet">HttpQueryString::offsetGet()</a></li>
+<li><a href="#HttpQueryString_offsetSet">HttpQueryString::offsetSet()</a></li>
+<li><a href="#HttpQueryString_offsetExists">HttpQueryString::offsetExists()</a></li>
+<li><a href="#HttpQueryString_offsetUnset">HttpQueryString::offsetUnset()</a></li>
 </li>
 </ul>
 </li>
@@ -1434,7 +1465,7 @@ http.cache_log is set.</p>
 </li>
 </ul>
 </div>
-    <p><b>Generated at: Sun, 28 May 2006 17:55:39 +0200</b></p>
+    <p><b>Generated at: Fri, 07 Jul 2006 21:23:59 +0200</b></p>
 </body>
 </html>