This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class GeneratorCollection, allows for lazy loaded arrays using Generators withouth it's limitations. | |
* | |
* This collection class takes Generator as argument, and allows user to threat it like any kind of array. It will take | |
* care about storing the values returned from generator so user can iterate over it several times. | |
* | |
* NOTE: In current form only works with generators that uses integers as keys (lists). | |
*/ |