Skip to content

Releases: DivanDesign/EvolutionCMS.libraries.ddTools

Version 0.57

08 Mar 23:14
Compare
Choose a tag to compare
  • + \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 the someObjectProp object|array.
    • * someArrayProp.0.thirdLevelProp — get property of the zero element of the someArrayProp array.

Version 0.56

29 Jan 12:30
Compare
Choose a tag to compare
  • + \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.
  • + \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

03 Dec 12:31
Compare
Choose a tag to compare
  • * \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

05 Sep 14:26
Compare
Choose a tag to compare
  • + \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

08 Jan 04:30
Compare
Choose a tag to compare
  • + \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

13 Dec 13:32
Compare
Choose a tag to compare
  • + \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

17 Nov 03:51
Compare
Choose a tag to compare
  • * \ddTools::parseText: Fixed working when $params->data is a multidimensional object.

Version 0.52

16 Nov 22:20
Compare
Choose a tag to compare
  • + \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

08 Nov 13:20
Compare
Choose a tag to compare
  • + \DDTools\ObjectTools::convertType: Added the ability to return stringQueryFormated.

Version 0.50

11 May 14:53
Compare
Choose a tag to compare
  • + \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 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.
        • + 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.