1 | <?php |
||
19 | trait PopulateObjectTrait |
||
20 | { |
||
21 | /** |
||
22 | * @param $row |
||
23 | * |
||
24 | * @return BaseObject |
||
25 | */ |
||
26 | abstract protected function createObject($row): BaseObject; |
||
27 | |||
28 | /** |
||
29 | * @inheritdoc |
||
30 | * |
||
31 | * @return BaseObject[]|array The resulting elements. |
||
32 | */ |
||
33 | public function populate($rows) |
||
51 | |||
52 | /** |
||
53 | * @param $rows |
||
54 | * |
||
55 | * @return mixed |
||
56 | */ |
||
57 | protected function createObjects($rows) |
||
67 | } |
||
68 |