diff --git a/README.md b/README.md index 9db2156..40d3350 100644 --- a/README.md +++ b/README.md @@ -330,7 +330,7 @@ Arrays, [JSON](https://en.wikipedia.org/wiki/JSON) and [Query string](https://en * `stringJsonArray` — [JSON](https://en.wikipedia.org/wiki/JSON) array * `stringHjsonObject` — [HJSON](https://hjson.github.io/) object * `stringHjsonArray` — [HJSON](https://hjson.github.io/) array - * `stringQueryFormated` + * `stringQueryFormated` — [Query string](https://en.wikipedia.org/wiki/Query_string) * **Required** * `$params->type` @@ -343,6 +343,7 @@ Arrays, [JSON](https://en.wikipedia.org/wiki/JSON) and [Query string](https://en * `'stringJsonAuto'` — `stringJsonObject` or `stringJsonArray` depends on input object * `'stringJsonObject'` * `'stringJsonArray'` + * `'stringQueryFormated'` * Default value: `'objectAuto'` diff --git a/src/ObjectTools/ObjectTools.php b/src/ObjectTools/ObjectTools.php index fc78868..d8563e7 100644 --- a/src/ObjectTools/ObjectTools.php +++ b/src/ObjectTools/ObjectTools.php @@ -71,7 +71,7 @@ public static function getPropValue($params){ /** * convertType - * @version 1.1 (2021-03-20) + * @version 1.2 (2021-11-08) * * @see README.md */ @@ -166,6 +166,9 @@ public static function convertType($params){ //array }elseif ($params->type == 'objectarray'){ $result = (array) $result; + //stringQueryFormated + }elseif ($params->type == 'stringqueryformated'){ + $result = http_build_query($result); //stringJson }elseif( substr(