nozavroni / csvelte

🕺🏻 CSV and Tabular Data library for PHP
http://phpcsv.com/
Other
6 stars 0 forks source link

Implement one of the Iterator interfaces for Collection #156

Closed nozavroni closed 6 years ago

nozavroni commented 8 years ago

The Collection class should be implementing Iterator or one of the related SPL interfaces/iterators (extend FilterIterator, CallbackFilterIterator, etc.). Figure out which one(s) make sense for which Collection and make it so.

nozavroni commented 7 years ago

AbstractCollection implements "Iterator" so this issue is technically complete, but I wonder if one of the other ones would be more appropriate...

nozavroni commented 7 years ago

I feel like "RecursiveTreeIterator" would be appropriate for the MultiCollection but it already extends AbstractCollection. Maybe I should implement all the shared collection methods using traits so that I can extend Iterators like this.

nozavroni commented 7 years ago

See issue #166