|
@@ 116-129 (lines=14) @@
|
| 113 |
|
* |
| 114 |
|
* @return IterableResult |
| 115 |
|
*/ |
| 116 |
|
public function iterate($stmt, $resultSetMapping, array $hints = []) |
| 117 |
|
{ |
| 118 |
|
$this->_stmt = $stmt; |
| 119 |
|
$this->_rsm = $resultSetMapping; |
| 120 |
|
$this->_hints = $hints; |
| 121 |
|
|
| 122 |
|
$evm = $this->_em->getEventManager(); |
| 123 |
|
|
| 124 |
|
$evm->addEventListener([Events::onClear], $this); |
| 125 |
|
|
| 126 |
|
$this->prepare(); |
| 127 |
|
|
| 128 |
|
return new IterableResult($this); |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
/** |
| 132 |
|
* Hydrates all rows returned by the passed statement instance at once. |
|
@@ 140-155 (lines=16) @@
|
| 137 |
|
* |
| 138 |
|
* @return array |
| 139 |
|
*/ |
| 140 |
|
public function hydrateAll($stmt, $resultSetMapping, array $hints = []) |
| 141 |
|
{ |
| 142 |
|
$this->_stmt = $stmt; |
| 143 |
|
$this->_rsm = $resultSetMapping; |
| 144 |
|
$this->_hints = $hints; |
| 145 |
|
|
| 146 |
|
$this->_em->getEventManager()->addEventListener([Events::onClear], $this); |
| 147 |
|
|
| 148 |
|
$this->prepare(); |
| 149 |
|
|
| 150 |
|
$result = $this->hydrateAllData(); |
| 151 |
|
|
| 152 |
|
$this->cleanup(); |
| 153 |
|
|
| 154 |
|
return $result; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
/** |
| 158 |
|
* Hydrates a single row returned by the current statement instance during |