"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"><?php<br />$newQS </span><span style="color: #007700">= new </span><span style="color: #0000BB">HttpQueryString</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #0000BB">$oldQS</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$newQS</span><span style="color: #007700">-></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">?></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>
<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>
</ul>
</div>
- <p><b>Generated at: Thu, 08 Jun 2006 23:59:56 +0200</b></p>
+ <p><b>Generated at: Thu, 06 Jul 2006 20:17:57 +0200</b></p>
</body>
</html>
HTTP_ARG_VAL(params, 0)
HTTP_END_ARGS;
+HTTP_BEGIN_ARGS(mod, 0)
+ HTTP_ARG_VAL(params, 0)
+HTTP_END_ARGS;
+
HTTP_BEGIN_ARGS(__getter, 1)
HTTP_ARG_VAL(name, 0)
HTTP_ARG_VAL(defval, 0)
HTTP_QUERYSTRING_ME(get, ZEND_ACC_PUBLIC)
HTTP_QUERYSTRING_ME(set, ZEND_ACC_PUBLIC)
+ HTTP_QUERYSTRING_ME(mod, ZEND_ACC_PUBLIC)
HTTP_QUERYSTRING_GME(getBool, ZEND_ACC_PUBLIC)
HTTP_QUERYSTRING_GME(getInt, ZEND_ACC_PUBLIC)
}
/* {{{ querystring helpers */
-#ifndef WONKY
#define http_querystring_instantiate(g) _http_querystring_instantiate((g) TSRMLS_CC)
static inline zval *_http_querystring_instantiate(zend_bool global TSRMLS_DC)
{
return zobj;
}
-#endif /* WONKY */
#define http_querystring_get(o, t, n, l, def, del, r) _http_querystring_get((o), (t), (n), (l), (def), (del), (r) TSRMLS_CC)
static inline void _http_querystring_get(zval *this_ptr, int type, char *name, uint name_len, zval *defval, zend_bool del, zval *return_value TSRMLS_DC)
}
/* }}} */
+/* {{{ proto HttpQueryString HttpQueryString::mod(mixed params)
+ *
+ * Copies the query string object and sets provided params at the clone.
+ * This is basically shorthand for:
+ * <pre>
+ * <?php
+ * $newQS = new HttpQueryString(false, $oldQS);
+ * $newQS->set($other_params);
+ * ?>
+ * </pre>
+ */
+PHP_METHOD(HttpQueryString, mod)
+{
+ zval *orig, *zobj, *qarr, *qstr, *params;
+
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", ¶ms)) {
+ zobj = http_querystring_instantiate(0);
+ orig = GET_PROP(queryArray);
+ qarr = GET_PROP_EX(zobj, queryArray);
+ qstr = GET_PROP_EX(zobj, queryString);
+
+ array_copy(orig, qarr);
+ http_querystring_modify(qarr, params);
+ http_querystring_update(qarr, qstr);
+
+ RETURN_ZVAL(zobj, 1, 1);
+ }
+}
+/* }}} */
+
#ifndef WONKY
/* {{{ proto static HttpQueryString HttpQueryString::singleton([bool global = true])
*
PHP_METHOD(HttpQueryString, toArray);
PHP_METHOD(HttpQueryString, get);
PHP_METHOD(HttpQueryString, set);
+PHP_METHOD(HttpQueryString, mod);
PHP_METHOD(HttpQueryString, getBool);
PHP_METHOD(HttpQueryString, getInt);
PHP_METHOD(HttpQueryString, getFloat);