Download the PHP package crocodile2u/chainy without Composer
On this page you can find all versions of the php package crocodile2u/chainy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package chainy
Chainy - a nicer way to apply a set of functions to a value
Have you ever written code like this?
Know what? You could do the same in a more readable and nice way:
Chainy is a pipeline of functions, where every next one gets input from the previous one's output. In the example above, when $chain->apply() is called on $array, it goes sequentially through filter(), map() and sort(). As you can expect, those methods are just wrappers for the PHP's built-in functions _arrayfilter, _arraymap and sort.
This is how things go with chainy:
- Create new Chain instance.
- Setup the pipeline, adding elements to the chain (in this casem filter to get rid of empty element, map to apply some modifications to every element that survived filter, and then sort the resulting array).
- Call Chain->apply() on the input array. The result is the filtered, modified and sorted array.
All versions of chainy with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
ext-mbstring Version *
ext-mbstring Version *
The package crocodile2u/chainy contains the following files
Loading the files please wait ....