Search by

dd / evolutioncms-libraries-ddtools

dd

A library with various tools facilitating your work.

Package info

github.com/DivanDesign/EvolutionCMS.libraries.ddTools

Homepage

Chat

Type:modxevo-library-ddtools

pkg:composer/dd/evolutioncms-libraries-ddtools

Statistics

Installs: 21

Dependents: 21

Suggesters: 0

Stars: 2

Open Issues: 1


README

A library with various tools facilitating your work.

Requires

Installation

Manually

  1. Create a new folder assets/libs/ddTools/.
  2. Extract the archive to the folder.

Using Composer

Just add dd/evolutioncms-libraries-ddtools to your composer.json.

ddTools version must be 0.14 or higher to use this method. If you use it, the compatibility with all your snippets, modules, etc. that use ddTools versions under 0.14 will be maintained.

Update using (MODX)EvolutionCMS.libraries.ddInstaller

Just run the following PHP code in your sources or Console:

//Include (MODX)EvolutionCMS.libraries.ddInstaller
require_once(
	$modx->getConfig('base_path')
	. 'assets/libs/ddInstaller/require.php'
);

//Update (MODX)EvolutionCMS.libraries.ddTools
\DDInstaller::install([
	'url' => 'https://github.com/DivanDesign/EvolutionCMS.libraries.ddTools',
]);
  • If ddTools is already exist on your site, ddInstaller will check it version and update it if needed.
  • If ddTools is not exist on your site, ddInstaller can't do anything because requires it for itself.

Reference

  • \ddTools — Static helpers: empty values, URLs, templates, parseText, renamed params, document ID/URL.
  • \DDTools\Tools\:
    • Files — File helpers: create, copy and remove directories, transform images (thumbnails, crop, resize, fill, watermark).
    • Objects — Helpers for objects and arrays: property access, type conversion, extend, unfold.
    • Cache — You can cache some data (e. g. a snippet result).
      • There are 2 levels of caching: stable (file-based) and quick ($_SESSION-based). All methods utilize both levels automatically.
  • \DDTools\ObjectCollection — Class representing a collection of some objects or arrays.
  • \DDTools\Storage — A uniform API for collections of items (items_add, items_update, items_delete, items_get).
    • Use it for a project table or an existing DB table (e. g. site_content) instead of raw SQL queries.
  • \DDTools\Base — Simple abstract class and trait with some small methods facilitating your work.
  • \DDTools\Snippet — Abstract class for snippets.

Links