| @@ 99-112 (lines=14) @@ | ||
| 96 | * |
|
| 97 | * @return IterableResult |
|
| 98 | */ |
|
| 99 | public function iterate($stmt, $resultSetMapping, array $hints = []) |
|
| 100 | { |
|
| 101 | $this->stmt = $stmt; |
|
| 102 | $this->rsm = $resultSetMapping; |
|
| 103 | $this->hints = $hints; |
|
| 104 | ||
| 105 | $evm = $this->em->getEventManager(); |
|
| 106 | ||
| 107 | $evm->addEventListener([Events::onClear], $this); |
|
| 108 | ||
| 109 | $this->prepare(); |
|
| 110 | ||
| 111 | return new IterableResult($this); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Hydrates all rows returned by the passed statement instance at once. |
|
| @@ 123-138 (lines=16) @@ | ||
| 120 | * |
|
| 121 | * @return array |
|
| 122 | */ |
|
| 123 | public function hydrateAll($stmt, $resultSetMapping, array $hints = []) |
|
| 124 | { |
|
| 125 | $this->stmt = $stmt; |
|
| 126 | $this->rsm = $resultSetMapping; |
|
| 127 | $this->hints = $hints; |
|
| 128 | ||
| 129 | $this->em->getEventManager()->addEventListener([Events::onClear], $this); |
|
| 130 | ||
| 131 | $this->prepare(); |
|
| 132 | ||
| 133 | $result = $this->hydrateAllData(); |
|
| 134 | ||
| 135 | $this->cleanup(); |
|
| 136 | ||
| 137 | return $result; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * Hydrates a single row returned by the current statement instance during |
|