1 | <?php |
||
17 | class RecordIterator implements \IteratorAggregate |
||
18 | { |
||
19 | /** |
||
20 | * Array of entity data to be fed into instantiators. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | private $data = []; |
||
25 | |||
26 | /** |
||
27 | * @var EntityInterface[] |
||
28 | */ |
||
29 | private $entities = []; |
||
30 | |||
31 | /** |
||
32 | * Class to be instantiated. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | private $class; |
||
37 | |||
38 | /** |
||
39 | * Responsible for entity construction. |
||
40 | * |
||
41 | * @invisible |
||
42 | * @var ORMInterface |
||
43 | */ |
||
44 | private $orm; |
||
45 | |||
46 | /** |
||
47 | * @param array $data |
||
48 | * @param string $class |
||
49 | * @param ORMInterface $orm |
||
50 | */ |
||
51 | public function __construct(array $data, string $class, ORMInterface $orm) |
||
57 | |||
58 | /** |
||
59 | * @return \ArrayIterator |
||
60 | */ |
||
61 | public function getIterator() |
||
79 | } |