The goal of this library is to provide some boilerplate code to assist you in creating more friendly collections when using ArrayIterator.
You can use this library by issuing the following command:
composer require kununu/collectionsRun the tests by doing:
composer install
vendor/bin/phpunitor
composer install
composer testTo run test and generate coverage information:
composer install
composer test-coverageThe library defines interfaces to deal with collections and also boilerplate code with default implementations.
You can either use the provided traits to your custom class extending ArrayIterator or simply expand the abstract collection classes using them.
It has a default implementation for a "basic" collection and also one to filter and group data on your collections (a "filterable" collection).
It defines interfaces to convert collection items to array, string and int and to compare items.
More details:
- Collection Interfaces
- Collection Trait
- Filterable Collection Trait
- Auto Sortable OffsetSet Trait
- Convertible
- Abstract Collections
- Key Value
- Abstract Item
- Mapper
- Collections Test Case
If you are interested in contributing read our contributing guidelines.