| @@ 82-91 (lines=10) @@ | ||
| 79 | /** |
|
| 80 | * {@inheritdoc} |
|
| 81 | */ |
|
| 82 | protected function hydrateAllData() |
|
| 83 | { |
|
| 84 | $result = []; |
|
| 85 | ||
| 86 | while ($data = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 87 | $this->hydrateRowData($data, $result); |
|
| 88 | } |
|
| 89 | ||
| 90 | return $result; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * {@inheritdoc} |
|
| @@ 36-45 (lines=10) @@ | ||
| 33 | /** |
|
| 34 | * {@inheritdoc} |
|
| 35 | */ |
|
| 36 | protected function hydrateAllData() |
|
| 37 | { |
|
| 38 | $result = []; |
|
| 39 | ||
| 40 | while ($data = $this->_stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
| 41 | $this->hydrateRowData($data, $result); |
|
| 42 | } |
|
| 43 | ||
| 44 | return $result; |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * {@inheritdoc} |
|
| @@ 63-74 (lines=12) @@ | ||
| 60 | /** |
|
| 61 | * {@inheritdoc} |
|
| 62 | */ |
|
| 63 | protected function hydrateAllData() |
|
| 64 | { |
|
| 65 | $result = []; |
|
| 66 | ||
| 67 | while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 68 | $this->hydrateRowData($row, $result); |
|
| 69 | } |
|
| 70 | ||
| 71 | $this->_em->getUnitOfWork()->triggerEagerLoads(); |
|
| 72 | ||
| 73 | return $result; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * {@inheritdoc} |
|
| @@ 163-178 (lines=16) @@ | ||
| 160 | * |
|
| 161 | * @return mixed |
|
| 162 | */ |
|
| 163 | public function hydrateRow() |
|
| 164 | { |
|
| 165 | $row = $this->_stmt->fetch(PDO::FETCH_ASSOC); |
|
| 166 | ||
| 167 | if ( ! $row) { |
|
| 168 | $this->cleanup(); |
|
| 169 | ||
| 170 | return false; |
|
| 171 | } |
|
| 172 | ||
| 173 | $result = []; |
|
| 174 | ||
| 175 | $this->hydrateRowData($row, $result); |
|
| 176 | ||
| 177 | return $result; |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * When executed in a hydrate() loop we have to clear internal state to |
|
| @@ 162-176 (lines=15) @@ | ||
| 159 | /** |
|
| 160 | * {@inheritdoc} |
|
| 161 | */ |
|
| 162 | protected function hydrateAllData() |
|
| 163 | { |
|
| 164 | $result = []; |
|
| 165 | ||
| 166 | while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 167 | $this->hydrateRowData($row, $result); |
|
| 168 | } |
|
| 169 | ||
| 170 | // Take snapshots from all newly initialized collections |
|
| 171 | foreach ($this->initializedCollections as $coll) { |
|
| 172 | $coll->takeSnapshot(); |
|
| 173 | } |
|
| 174 | ||
| 175 | return $result; |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * Initializes a related collection. |
|