@@ 21-30 (lines=10) @@ | ||
18 | /** |
|
19 | * {@inheritdoc} |
|
20 | */ |
|
21 | protected function hydrateAllData() |
|
22 | { |
|
23 | $result = []; |
|
24 | ||
25 | while ($data = $this->stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
26 | $this->hydrateRowData($data, $result); |
|
27 | } |
|
28 | ||
29 | return $result; |
|
30 | } |
|
31 | ||
32 | /** |
|
33 | * {@inheritdoc} |
@@ 49-60 (lines=12) @@ | ||
46 | /** |
|
47 | * {@inheritdoc} |
|
48 | */ |
|
49 | protected function hydrateAllData() |
|
50 | { |
|
51 | $result = []; |
|
52 | ||
53 | while ($row = $this->stmt->fetch(PDO::FETCH_ASSOC)) { |
|
54 | $this->hydrateRowData($row, $result); |
|
55 | } |
|
56 | ||
57 | $this->em->getUnitOfWork()->triggerEagerLoads(); |
|
58 | ||
59 | return $result; |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * {@inheritdoc} |
@@ 71-80 (lines=10) @@ | ||
68 | /** |
|
69 | * {@inheritdoc} |
|
70 | */ |
|
71 | protected function hydrateAllData() |
|
72 | { |
|
73 | $result = []; |
|
74 | ||
75 | while ($data = $this->stmt->fetch(PDO::FETCH_ASSOC)) { |
|
76 | $this->hydrateRowData($data, $result); |
|
77 | } |
|
78 | ||
79 | return $result; |
|
80 | } |
|
81 | ||
82 | /** |
|
83 | * {@inheritdoc} |
@@ 145-159 (lines=15) @@ | ||
142 | /** |
|
143 | * {@inheritdoc} |
|
144 | */ |
|
145 | protected function hydrateAllData() |
|
146 | { |
|
147 | $result = []; |
|
148 | ||
149 | while ($row = $this->stmt->fetch(PDO::FETCH_ASSOC)) { |
|
150 | $this->hydrateRowData($row, $result); |
|
151 | } |
|
152 | ||
153 | // Take snapshots from all newly initialized collections |
|
154 | foreach ($this->initializedCollections as $coll) { |
|
155 | $coll->takeSnapshot(); |
|
156 | } |
|
157 | ||
158 | return $result; |
|
159 | } |
|
160 | ||
161 | /** |
|
162 | * Initializes a related collection. |
@@ 146-161 (lines=16) @@ | ||
143 | * |
|
144 | * @return mixed |
|
145 | */ |
|
146 | public function hydrateRow() |
|
147 | { |
|
148 | $row = $this->stmt->fetch(PDO::FETCH_ASSOC); |
|
149 | ||
150 | if (! $row) { |
|
151 | $this->cleanup(); |
|
152 | ||
153 | return false; |
|
154 | } |
|
155 | ||
156 | $result = []; |
|
157 | ||
158 | $this->hydrateRowData($row, $result); |
|
159 | ||
160 | return $result; |
|
161 | } |
|
162 | ||
163 | /** |
|
164 | * When executed in a hydrate() loop we have to clear internal state to |