From: Michael Wallner Date: Thu, 31 Oct 2013 16:05:33 +0000 (+0100) Subject: QueryString X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=841dfdc712d783355b282da9991d0de2a9c584ef;p=mdref%2Fmdref QueryString --- diff --git a/http/QueryString/get.md b/http/QueryString/get.md new file mode 100644 index 0000000..c742faf --- /dev/null +++ b/http/QueryString/get.md @@ -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 index 0000000..a33c8c5 --- /dev/null +++ b/http/QueryString/getArray.md @@ -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 index 0000000..4edf2b9 --- /dev/null +++ b/http/QueryString/getBool.md @@ -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 index 0000000..f26fba4 --- /dev/null +++ b/http/QueryString/getFloat.md @@ -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 index 0000000..8fa3c33 --- /dev/null +++ b/http/QueryString/getInt.md @@ -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 index 0000000..395df26 --- /dev/null +++ b/http/QueryString/getObject.md @@ -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 index 0000000..f29d0d2 --- /dev/null +++ b/http/QueryString/getString.md @@ -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 index 0000000..a1ba5b8 --- /dev/null +++ b/http/QueryString/mod.md @@ -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 index 0000000..894872f --- /dev/null +++ b/http/QueryString/offsetExists.md @@ -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 index 0000000..d43e8f0 --- /dev/null +++ b/http/QueryString/offsetGet.md @@ -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 index 0000000..91c6519 --- /dev/null +++ b/http/QueryString/offsetSet.md @@ -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 index 0000000..17aa667 --- /dev/null +++ b/http/QueryString/offsetUnset.md @@ -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 index 0000000..3fe69f9 --- /dev/null +++ b/http/QueryString/serialize.md @@ -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 index 0000000..cb817fb --- /dev/null +++ b/http/QueryString/set.md @@ -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 index 0000000..2bdfbb5 --- /dev/null +++ b/http/QueryString/toArray.md @@ -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 index 0000000..9da189e --- /dev/null +++ b/http/QueryString/toString.md @@ -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 index 0000000..ba14d0a --- /dev/null +++ b/http/QueryString/unserialize.md @@ -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 index 0000000..baeb2f6 --- /dev/null +++ b/http/QueryString/xlate.md @@ -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 diff --git a/index.css b/index.css index 2f9c00f..e91ade1 100644 --- 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; }