| 1 | <?php |
||
| 15 | class RecordIterator implements \IteratorAggregate |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Array of entity data to be fed into instantiators. |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | private $data = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Class to be instantiated. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $class; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Responsible for entity construction. |
||
| 33 | * |
||
| 34 | * @invisible |
||
| 35 | * @var ORMInterface |
||
| 36 | */ |
||
| 37 | private $orm; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param array $data |
||
| 41 | * @param string $class |
||
| 42 | * @param ORMInterface $orm |
||
| 43 | */ |
||
| 44 | public function __construct(array $data, string $class, ORMInterface $orm) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Generate over data. |
||
| 53 | * Method will use pibot |
||
| 54 | * |
||
| 55 | * @return \Generator |
||
| 56 | */ |
||
| 57 | public function getIterator(): \Generator |
||
| 76 | } |