Download the PHP package jyxon/data-tools without Composer
On this page you can find all versions of the php package jyxon/data-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jyxon/data-tools
More information about jyxon/data-tools
Files in jyxon/data-tools
Package data-tools
Short Description A simple library for data manipulation.
License MIT
Homepage https://www.jyxon.com
Informations about the package data-tools
Data Tools
Data Tools is a simple library for basic operations on data. This library simplifies simple operations that sometimes might be required during development. It also adds a few extra capabilities by using objects.
Installation
Installing Data Tools can be done through composer. This is done with the following command:
Usage
The package is separated into 2 namespace (currently).
Native
Within the Native namespace we have defined packages that are simple manipulators of native data types and object of PHP.
ArrayTool
The ArrayTool
is a tool that enables paths within arrays. It also allows flattening of an array in this manner and expanding a flattened array. For the ArrayTool
a path
or flat path
is a "/" (slash) separated path (foo/bar). A array path
is basically the result of an exploded path (the result of explode('/', $path)
).
The ArrayTool
can be initialised as follows:
The following functions are available for the ArrayTool
:
DataObject
The DataObject
is not so much a tool, but more a basis for 3 standard functions for an object. You could use it as a basis, but also as an Object on it's own as a data container. You can either choose to let an existing class extend the DataObject
to "add" the functionality to the class. Or you can choose to initialise it on it's own:
The functions that this object adds are:
ReflectorTool
The ReflectorTool
adds a few extra functions to the initial ReflectionClass
native to PHP. It can be initialised as follows:
The ReflectorTool
adds the following functions:
Operation
Within the Operation namespace we have defined packages that are not native to PHP, but add functionality or simplify standard operations.
CalculationTool
The CalculationTool
exposes some calculations that can be tedious to implement.
It can be initialised as follows:
It exposes the following functions:
PathTool
The PathTool
is a parser for paths. It turns readable paths into useable paths for your application.
It exposes the following functions:
VersionTool
A tool to analyse versions for your application.
It can be initialised as follows:
It exposes the following functions:
Feedback
We like to get some feedback on this package. You can do so by creating an issue on GitHub. Also keep in mind that this package might receive quite some updates in the near future, due to our own development process requiring this package to change.