QueryString
authorMichael Wallner <mike@php.net>
Thu, 31 Oct 2013 16:05:33 +0000 (17:05 +0100)
committerMichael Wallner <mike@php.net>
Thu, 31 Oct 2013 16:05:33 +0000 (17:05 +0100)
19 files changed:
http/QueryString/get.md [new file with mode: 0644]
http/QueryString/getArray.md [new file with mode: 0644]
http/QueryString/getBool.md [new file with mode: 0644]
http/QueryString/getFloat.md [new file with mode: 0644]
http/QueryString/getInt.md [new file with mode: 0644]
http/QueryString/getObject.md [new file with mode: 0644]
http/QueryString/getString.md [new file with mode: 0644]
http/QueryString/mod.md [new file with mode: 0644]
http/QueryString/offsetExists.md [new file with mode: 0644]
http/QueryString/offsetGet.md [new file with mode: 0644]
http/QueryString/offsetSet.md [new file with mode: 0644]
http/QueryString/offsetUnset.md [new file with mode: 0644]
http/QueryString/serialize.md [new file with mode: 0644]
http/QueryString/set.md [new file with mode: 0644]
http/QueryString/toArray.md [new file with mode: 0644]
http/QueryString/toString.md [new file with mode: 0644]
http/QueryString/unserialize.md [new file with mode: 0644]
http/QueryString/xlate.md [new file with mode: 0644]
index.css

diff --git a/http/QueryString/get.md b/http/QueryString/get.md
new file mode 100644 (file)
index 0000000..c742faf
--- /dev/null
@@ -0,0 +1,25 @@
+# mixed http\QueryString::get([string $name = NULL[, mixed $type = NULL[, mixed $defval = NULL[, bool $delete = false]]]])
+
+Retrieve an querystring value.
+
+See http\QueryString::TYPE_* constants.
+
+## Params:
+
+* Optional string $name = NULL  
+  The key to retrieve the value for.
+* Optional mixed $type = NULL  
+  The type to cast the value to. See http\QueryString::TYPE_* constants.
+* Optional mixed $defval = NULL  
+  The default value to return if the key $name does not exist.
+* Optional bool $delete = false  
+  Whether to delete the entry from the querystring after retrieval.
+
+
+## Returns:
+
+* http\QueryString, if called without arguments.
+* string, the whole querystring if $name is of zero length.
+* mixed, $defval if the key $name does not exist.
+* mixed, the querystring value cast to $type if $type was specified and the key $name exists.
+* string, the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.
diff --git a/http/QueryString/getArray.md b/http/QueryString/getArray.md
new file mode 100644 (file)
index 0000000..a33c8c5
--- /dev/null
@@ -0,0 +1,17 @@
+# array http\QueryString::getArray(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve an array value with at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* array, the (casted) value.
+* mixed, $defval if offset $name does not exist.
diff --git a/http/QueryString/getBool.md b/http/QueryString/getBool.md
new file mode 100644 (file)
index 0000000..4edf2b9
--- /dev/null
@@ -0,0 +1,17 @@
+# bool http\QueryString::getBool(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve a boolean value at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* bool, the (casted) value.
+* mixed, $defval if offset $name does not exist.
diff --git a/http/QueryString/getFloat.md b/http/QueryString/getFloat.md
new file mode 100644 (file)
index 0000000..f26fba4
--- /dev/null
@@ -0,0 +1,17 @@
+# float http\QueryString::getFloat(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve a float value at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* float, the (casted) value.
+* mixed, $defval if offset $name does not exist.
diff --git a/http/QueryString/getInt.md b/http/QueryString/getInt.md
new file mode 100644 (file)
index 0000000..8fa3c33
--- /dev/null
@@ -0,0 +1,17 @@
+# int http\QueryString::getInt(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve a int value at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* int, the (casted) value.
+* mixed, $defval if offset $name does not exist.
diff --git a/http/QueryString/getObject.md b/http/QueryString/getObject.md
new file mode 100644 (file)
index 0000000..395df26
--- /dev/null
@@ -0,0 +1,17 @@
+# object http\QueryString::getObject(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve a object value with at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* object, the (casted) value.
+* mixed, $defval if offset $name does not exist.
diff --git a/http/QueryString/getString.md b/http/QueryString/getString.md
new file mode 100644 (file)
index 0000000..f29d0d2
--- /dev/null
@@ -0,0 +1,18 @@
+# string http\QueryString::getString(string $name[, mixed $defval = NULL[, bool $delete = false)
+
+Retrieve a string value with at offset $name.
+
+## Params:
+
+* string $name  
+  The key to look up.
+* Optional mixed $defval = NULL  
+  The default value to return if the offset $name does not exist.
+* Optional bool $delete = false  
+  Whether to remove the key and value from the querystring after retrieval.
+  
+## Returns:
+
+* string, the (casted) value.
+* mixed, $defval if offset $name does not exist.
+
diff --git a/http/QueryString/mod.md b/http/QueryString/mod.md
new file mode 100644 (file)
index 0000000..a1ba5b8
--- /dev/null
@@ -0,0 +1,16 @@
+# http\QueryString http\QueryString::mod(mixed $params = NULL)
+
+Set additional $params to a clone of this instance. 
+See http\QueryString::set().
+
+> **Note:** This method returns a clone (copy) of this instance
+
+## Params:
+
+* mixed $params = NULL  
+  Additional params as object, array or string to parse.
+
+
+## Returns:
+
+* http\QueryString, clone.
diff --git a/http/QueryString/offsetExists.md b/http/QueryString/offsetExists.md
new file mode 100644 (file)
index 0000000..894872f
--- /dev/null
@@ -0,0 +1,12 @@
+# bool http\QueryString::offsetExists(string $name)
+
+Implements ArrayAccess.
+
+## Params:
+
+* string $name  
+  The offset to look up.
+
+## Returns:
+
+* bool, whether the key $name isset.
diff --git a/http/QueryString/offsetGet.md b/http/QueryString/offsetGet.md
new file mode 100644 (file)
index 0000000..d43e8f0
--- /dev/null
@@ -0,0 +1,13 @@
+# mixed http\QueryString::offsetGet(string $name)
+
+Implements ArrayAccess.
+
+## Params:
+
+* mixed $offset  
+  The offset to look up.
+  
+## Returns:
+
+* mixed, the value locate at offset $name.
+* NULL, if key $name could not be found.
diff --git a/http/QueryString/offsetSet.md b/http/QueryString/offsetSet.md
new file mode 100644 (file)
index 0000000..91c6519
--- /dev/null
@@ -0,0 +1,11 @@
+# void http\QueryString::offsetSet(string $name, mixed $data)
+
+Implements ArrayAccess.
+
+## Params:
+
+* string $name  
+  The key to set the value for.
+* mixed $data  
+  The data to place at offset $name.
+
diff --git a/http/QueryString/offsetUnset.md b/http/QueryString/offsetUnset.md
new file mode 100644 (file)
index 0000000..17aa667
--- /dev/null
@@ -0,0 +1,9 @@
+# void http\QueryString::offsetUnset(string $name)
+
+Implements ArrayAccess.
+
+## Params:
+
+* string $name  
+  The offset to look up.
+
diff --git a/http/QueryString/serialize.md b/http/QueryString/serialize.md
new file mode 100644 (file)
index 0000000..3fe69f9
--- /dev/null
@@ -0,0 +1,12 @@
+# string http\QueryString::serialize()
+
+Implements Serializable.
+See http\QueryString::toString().
+
+## Params:
+
+None.
+
+## Returns:
+
+* string, the x-www-form-urlencoded querystring.
diff --git a/http/QueryString/set.md b/http/QueryString/set.md
new file mode 100644 (file)
index 0000000..cb817fb
--- /dev/null
@@ -0,0 +1,12 @@
+# http\QueryString http\QueryString::set(mixed $params)
+
+Set additional querystring entries.
+
+## Params:
+
+* mixed $params  
+  Additional params as object, array or string to parse.
+
+## Returns:
+
+* http\QueryString, self.
diff --git a/http/QueryString/toArray.md b/http/QueryString/toArray.md
new file mode 100644 (file)
index 0000000..2bdfbb5
--- /dev/null
@@ -0,0 +1,11 @@
+# array http\QueryString::toArray()
+
+Simply returns http\QueryString::$queryArray.
+
+## Params:
+
+None.
+
+## Returns:
+
+* array, the $queryArray property.
diff --git a/http/QueryString/toString.md b/http/QueryString/toString.md
new file mode 100644 (file)
index 0000000..9da189e
--- /dev/null
@@ -0,0 +1,11 @@
+# string http\QueryString::toString()
+
+Get the string represenation of the querystring (x-www-form-urlencoded).
+
+## Params:
+
+None.
+
+## Returns:
+
+* string, the x-www-form-urlencoded querystring.
diff --git a/http/QueryString/unserialize.md b/http/QueryString/unserialize.md
new file mode 100644 (file)
index 0000000..ba14d0a
--- /dev/null
@@ -0,0 +1,12 @@
+# void http\QueryString::unseralize(string $serialized)
+
+Implements Serializable.
+
+## Params:
+
+* string $serialized  
+  The x-www-form-urlencoded querystring.
+
+## Throws:
+
+* http\Exception
diff --git a/http/QueryString/xlate.md b/http/QueryString/xlate.md
new file mode 100644 (file)
index 0000000..baeb2f6
--- /dev/null
@@ -0,0 +1,20 @@
+# http\QueryString http\QueryString::xlate($from_enc, $to_enc)
+
+Translate character encodings of the querystring with ext/iconv.
+
+> **Note:** This method is only available when ext/iconv support was enabled at build time.
+
+## Params:
+
+* string $from_enc  
+  The encoding to convert from.
+* string $to_enc  
+  The encoding to convert to.
+
+## Returns:
+
+* http\QueryString, self.
+
+## Throws:
+
+* http\Exception
index 2f9c00f0d845740ca9f4c173c3f29fe6dfb3f118..e91ade18eb46a84404d3fcfbeb694613ca06f0c1 100644 (file)
--- a/index.css
+++ b/index.css
@@ -21,7 +21,7 @@ body>* {
        background: #f0f0f0;
        border-bottom-left-radius: 10px;
        padding: 0;
-       margin-bottom: 1em;
+       margin-bottom: .2em;
        margin-left: 2em;
 }
 .sidebar>ul {
@@ -111,7 +111,7 @@ li h3 {
        border-radius: 4px;
        display: inline-block;
        width: auto;
-       padding: .5em;
+       padding: .2em;
        margin: .5em 0 0 0;
 }