dhii / iterator-helper-base
Common functionality for working with iterables
v0.1-alpha2
2018-03-22 11:25 UTC
Requires
- php: ^5.4 | ^7.0
- dhii/exception: ^0.1-alpha4
Requires (Dev)
- codeclimate/php-test-reporter: <=0.3.2
- dhii/invocable-interface: 0.1-alpha1
- dhii/php-cs-fixer-config: ^0.1
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- ptrofimov/xpmock: dev-master
Suggests
- dhii/callback-abstract: For structural invocation of callables
This package is auto-updated.
Last update: 2026-03-07 06:16:26 UTC
README
Common functionality for working with iterables.
Traits
ResolveIteratorCapableTrait- Retrieves the deepest iterator within a depth limit in an iterator hierarchy, where every parent is anIteratorAggregate. Can use a complex test to look for things that are not only iterators. Detects some signs of infinite recursion.CountIterableCapableTrait- Counts elements in an iterable which passes normalization byNormalizeIterableCapableTrait. Uses the most optimal method for retrieving the count.NormalizeIteratorCapableTrait- Normalizes any iterable that passes normalization byNormalizeIterableCapableTraitinto an instance ofIterator.MapIterableCapableTrait- Maps an iterable, similarly toarray_map()oriterator_apply().