Releases: DivanDesign/EvolutionCMS.libraries.ddTools
Releases · DivanDesign/EvolutionCMS.libraries.ddTools
Version 0.57
- +
\DDTools\ObjectTools::getPropValue
→ Parameters →$params->propName
: The method can now get the value of an object property or an array element in any nesting level. Just use'.'
to get nested properties.
Several examples (see full examples in README):- *
somePlainProp
— get first-level property. - *
someObjectProp.secondLevelProp
— get property of thesomeObjectProp
object|array. - *
someArrayProp.0.thirdLevelProp
— get property of the zero element of thesomeArrayProp
array.
- *
Version 0.56
- +
\ddTools::sort2dArray
→ Parameters →$array[$i]
: Can also be set as object. - *
\DDTools\Base\Base
:- * The class has been renamed from
\DDTools\BaseClass
. Backward compatibility is maintained (you can still use\DDTools\BaseClass
, but it is not recommended). - * The class has become abstract.
- -
createChildInstance
: The method has been removed, use\DDTools\Base\AncestorTrait::createChildInstance
instead. Backward compatibility is maintained (you can still use\DDTools\BaseClass::createChildInstance
, but it is not recommended). - +
toJSON
: Returns JSON-array if$this->toArray
returns indexed array.
- * The class has been renamed from
- +
\DDTools\Base\AncestorTrait
: The new trait. - +
\DDTools\ObjectCollection
:- +
toJSON
,__toString
: The new public methods. Get an JSON-array of all collection items. - +
\DDTools\ObjectCollection::setOneItemData
,getOneItemData
: The new protected methods.
- +
Version 0.55.1
- *
\DDTools\FilesTools::modifyImage
: Included PHP.libraries.phpThumb has been updated from 1.7.15-202004301145 to 1.7.19-202210110924 (now supports WebP, PHP8, etc).
Version 0.55
- +
\ddTools::convertUrlToAbsolute
: The new public method. Converts relative URLs to absolute. See more info and examples in README.md. - * README: Various improvements.
Version 0.54
- +
\DDTools\BaseClass::setExistingProps
→ Parameters →$props
: Can also be set as a JSON, HJSON or Query formatted string. - * Included PHP.libraries.HJSON has been updated from 2.1 to 2.2.
- + README → Installation → Update using (MODX)EvolutionCMS.libraries.ddInstaller.
Version 0.53
- +
\DDTools\ObjectCollection
: The new class representing a collection of some objects or arrays. See more info and examples in README. - *
\ddTools::parseText
→ Parameters →$params->data
: A bug with multidimensional objects has been fixed. - * README:
- - Documentation: Useless header level has been removed.
- * Examples: Several missed characters have been added.
Version 0.52.1
- *
\ddTools::parseText
: Fixed working when$params->data
is a multidimensional object.
Version 0.52
- +
\DDTools\ObjectTools::unfold
: The new method.
Converts a multidimensional array/object into an one-dimensional one joining the keys with$params->keySeparator
.
For example, it can be helpful while using placeholders like[+size.width+]
.
See more info and examples in README.md.
Version 0.51
- +
\DDTools\ObjectTools::convertType
: Added the ability to returnstringQueryFormated
.
Version 0.50
- +
\DDTools\Response
:- +
setMetaData
: The new public method. Setter for$this->meta
and$this->data
. - +
setMeta
→ Parameters:- +
$meta['success']
: Is not required anymore and by default will be equal totrue
. - +
$meta['code']
: Is not required anymore and by default will be equal to200
or400
depending on$meta['success']
. - +
$meta
:- + Can also be set as stdClass, stringJsonObject, stringHjsonObject, stringQueryFormated.
- + 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 ofsuccess
andcode
.
- +