diff --git a/CHANGELOG.md b/CHANGELOG.md index ee7db42..2ac889c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # (MODX)EvolutionCMS.libraries.ddTools changelog +## Version 0.51 (2021-11-08) +* \+ `\DDTools\ObjectTools::convertType`: Added the ability to return `stringQueryFormated`. + + ## Version 0.50 (2021-05-11) * \+ `\DDTools\Response`: * \+ `setMetaData`: The new public method. Setter for `$this->meta` and `$this->data`. diff --git a/CHANGELOG_ru.md b/CHANGELOG_ru.md index c1d0c93..d2b8fb1 100644 --- a/CHANGELOG_ru.md +++ b/CHANGELOG_ru.md @@ -1,6 +1,10 @@ # (MODX)EvolutionCMS.libraries.ddTools changelog +## Версия 0.51 (2021-11-08) +* \+ `\DDTools\ObjectTools::convertType`: Добавлена возможность конвертировать в `stringQueryFormated`. + + ## Версия 0.50 (2021-05-11) * \+ `\DDTools\Response`: * \+ `setMetaData`: Новый публичный метод. Сеттер для `$this->meta` и `$this->data`. 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/composer.json b/composer.json index 899f585..9841f38 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dd/evolutioncms-libraries-ddtools", "type": "modxevo-library-ddtools", - "version": "0.50.0", + "version": "0.51.0", "description": "A library with various tools facilitating your work.", "keywords": [ "modx", diff --git a/modx.ddtools.class.php b/modx.ddtools.class.php index 11a9430..7932d98 100644 --- a/modx.ddtools.class.php +++ b/modx.ddtools.class.php @@ -1,7 +1,7 @@ type == 'objectarray'){ $result = (array) $result; + //stringQueryFormated + }elseif ($params->type == 'stringqueryformated'){ + $result = http_build_query($result); //stringJson }elseif( substr(