diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fbfdf1..380b7cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # (MODX)EvolutionCMS.libraries.ddTools changelog +## Version 0.58.1 (2023-03-29) +* \* `\DDTools\ObjectTools::convertType` → Parameters → `$params->type` → Valid values → `'stringQueryFormatted'`: A mistake has been fixed. The incorrect value `'stringQueryFormated'` is also supported for backward compatibility. + + ## Version 0.58 (2023-03-21) * \+ `\DDTools\Base\AncestorTrait::createChildInstance` → Parameters → `$params->parentDir`: Is no longer required and by default is equal to dirname of a class that uses this trait. @@ -61,7 +65,7 @@ ## Version 0.51 (2021-11-08) -* \+ `\DDTools\ObjectTools::convertType`: Added the ability to return `stringQueryFormated`. +* \+ `\DDTools\ObjectTools::convertType`: Added the ability to return `stringQueryFormatted`. ## Version 0.50 (2021-05-11) @@ -71,7 +75,7 @@ * \+ `$meta['success']`: Is not required anymore and by default will be equal to `true`. * \+ `$meta['code']`: Is not required anymore and by default will be equal to `200` or `400` depending on `$meta['success']`. * \+ `$meta`: - * \+ Can also be set as stdClass, stringJsonObject, stringHjsonObject, stringQueryFormated. + * \+ Can also be set as stdClass, stringJsonObject, stringHjsonObject, stringQueryFormatted. * \+ Is not required anymore and by default will be equal to `['success' => true, 'code' => 200]`. * \+ `setMetaMessage`: If `$this->meta` is not set, it will be set with default values of `success` and `code`. diff --git a/CHANGELOG_ru.md b/CHANGELOG_ru.md index 8075c70..4b408f2 100644 --- a/CHANGELOG_ru.md +++ b/CHANGELOG_ru.md @@ -1,6 +1,10 @@ # (MODX)EvolutionCMS.libraries.ddTools changelog +## Версия 0.58.1 (2023-03-29) +* \* `\DDTools\ObjectTools::convertType` → Параметры → `$params->type` → Допустимые значения → `'stringQueryFormatted'`: Исправлена ошибка в написании. Некорректное значение `'stringQueryFormated'` также поддерживается для обратной совместимости. + + ## Версия 0.58 (2023-03-21) * \+ `\DDTools\Base\AncestorTrait::createChildInstance` → Параметры → `$params->parentDir`: Больше не обязателен и по умолчанию равен папке класса, использующего этот трейт. @@ -61,7 +65,7 @@ ## Версия 0.51 (2021-11-08) -* \+ `\DDTools\ObjectTools::convertType`: Добавлена возможность конвертировать в `stringQueryFormated`. +* \+ `\DDTools\ObjectTools::convertType`: Добавлена возможность конвертировать в `stringQueryFormatted`. ## Версия 0.50 (2021-05-11) @@ -71,7 +75,7 @@ * \+ `$meta['success']`: Больше не обязателен и по умолчанию будет равен `true`. * \+ `$meta['code']`: Больше не обязателен и по умолчанию будет равен `200` или `400` в зависимости от `$meta['success']`. * \+ `$meta`: - * \+ Также может быть задан как stdClass, stringJsonObject, stringHjsonObject, stringQueryFormated. + * \+ Также может быть задан как stdClass, stringJsonObject, stringHjsonObject, stringQueryFormatted. * \+ Больше не обязателен и по умолчанию будет равен `['success' => true, 'code' => 200]`. * \+ `setMetaMessage`: Если `$this->meta` не задано, будет задано со значениями по умолчанию `success` и `code`. diff --git a/README.md b/README.md index 59e9a25..76e7cfc 100644 --- a/README.md +++ b/README.md @@ -2128,6 +2128,7 @@ array( * [Home page](https://code.divandesign.biz/modx/ddtools) * [Telegram chat](https://t.me/dd_code) * [Packagist](https://packagist.org/packages/dd/evolutioncms-libraries-ddtools) +* [GitHub](https://github.com/DivanDesign/EvolutionCMS.libraries.ddTools) \ No newline at end of file diff --git a/composer.json b/composer.json index 621e173..58d2978 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dd/evolutioncms-libraries-ddtools", "type": "modxevo-library-ddtools", - "version": "0.58.0", + "version": "0.58.1", "description": "A library with various tools facilitating your work.", "keywords": [ "modx", diff --git a/modx.ddtools.class.php b/modx.ddtools.class.php index e148f24..f0a14c9 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'){ + //stringQueryFormatted + }elseif ( + $params->type == 'stringqueryformatted' || + //Backward compatibility with typo + $params->type == 'stringqueryformated' + ){ $result = http_build_query($result); //stringJson }elseif( diff --git a/src/Response/Response.php b/src/Response/Response.php index e45b419..d0ef43d 100644 --- a/src/Response/Response.php +++ b/src/Response/Response.php @@ -143,7 +143,7 @@ public function validateMetaMessage($message){ /** * setMeta - * @version 1.4 (2021-05-11) + * @version 1.4.1 (2023-03-29) * * @desc Setter for $this->meta. * @@ -152,7 +152,7 @@ public function validateMetaMessage($message){ * @return {boolean} */ public function setMeta($meta = []){ - //If $meta is set as stdClass, stringJsonObject, stringHjsonObject or stringQueryFormated + //If $meta is set as stdClass, stringJsonObject, stringHjsonObject or stringQueryFormatted if (!is_array($meta)){ $meta = \DDTools\ObjectTools::convertType([ 'object' => $meta, @@ -238,7 +238,7 @@ public function setData($data){ /** * setMetaData - * @version 1.0 (2021-05-11) + * @version 1.0.1 (2023-03-29) * * @desc Setter for $this->meta and $this->data. * @@ -247,7 +247,7 @@ public function setData($data){ * @return {void} */ public function setMetaData($params){ - //If $meta is set as stdClass, stringJsonObject, stringHjsonObject or stringQueryFormated + //If $meta is set as stdClass, stringJsonObject, stringHjsonObject or stringQueryFormatted if (!is_array($params)){ $params = \DDTools\ObjectTools::convertType([ 'object' => $params,