kununu / collections
To reduce boilerplate associated with collections
Installs: 8 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 6
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- kununu/scripts: >=5.0
- phpunit/phpunit: ^10.5
- dev-master
- v5.1.0
- v5.0.0
- v4.1.0
- v4.0.0
- v3.1.1
- v3.1.0
- v3.0.2
- v3.0.1
- v3.0.0
- v2.0.0
- 1.11.x-dev
- v1.11.1
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.0
- dev-backportChunkToV1.11
- dev-makeCollectionChunkable
- dev-update_ci_cd
- dev-introduceQuodana
This package is auto-updated.
Last update: 2024-11-18 15:32:31 UTC
README
The goal of this library is to provide some boilerplate code to assist you in creating more friendly collections when using ArrayIterator
.
Install
You can use this library by issuing the following command:
composer require kununu/collections
Running Tests
Run the tests by doing:
composer install vendor/bin/phpunit
or
composer install
composer test
To run test and generate coverage information:
composer install composer test-coverage
Usage
The 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
- Abstract Item
- Mapper
Contribute
If you are interested in contributing read our contributing guidelines.