clphillips / seedling

A framework agnostic database seeding and fixture library
MIT License
0 stars 0 forks source link

Make 'Iterator' a valid fixture type #31

Open clphillips opened 9 years ago

clphillips commented 9 years ago

For seeding tons of data, it's necessary to automate the process, as opposed to building a giant array.

For example, we might want something like this:

$numberOfRecords = 100000;
$items = new ItemsIterator($numberOfRecords);
return $items;

And ItemsIterator then dynamically generates the records as they are requested. This minimizes memory, and opens up a huge range of possibilities.