https://github.com/senseexception/moreiterators
A collection of Iterators adding to the ones shipped with PHP
https://github.com/senseexception/moreiterators
Last synced: 11 months ago
JSON representation
A collection of Iterators adding to the ones shipped with PHP
- Host: GitHub
- URL: https://github.com/senseexception/moreiterators
- Owner: SenseException
- License: mit
- Created: 2014-12-13T22:14:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-07T21:11:21.000Z (over 11 years ago)
- Last Synced: 2025-01-19T18:51:24.434Z (over 1 year ago)
- Language: PHP
- Size: 184 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MoreIterators
[](https://travis-ci.org/SenseException/MoreIterators)
Extending the shipped Iterators of PHP with new Iterators
## Really? More Iterators?
Like the name says, it is a repository with Iterators. Iterators are a underestimated
pattern and can be a help when it is about a traversable data structure. Read more
about PHP Iterator in the official [PHP documentation](http://php.net/manual/en/spl.iterators.php).
Sure, PHP has a lot of Iterators, but still you can do so much more with them and
for the main reason: I love Iterators.
## What kind of Iterator does this repository contain?
### FileContent
* CsvIterator (iterate through a CSV file)
### Mapping
* ValueAsKeyIterator (use a part of the current value as key, like the id of a model object)
### Filter
* UniqueIterator