| @@ 178-197 (lines=20) @@ | ||
| 175 | * |
|
| 176 | * @return array |
|
| 177 | */ |
|
| 178 | public function fetchAllArray() |
|
| 179 | { |
|
| 180 | // init |
|
| 181 | $data = array(); |
|
| 182 | ||
| 183 | if ( |
|
| 184 | $this->_result |
|
| 185 | && |
|
| 186 | !$this->is_empty() |
|
| 187 | ) { |
|
| 188 | $this->reset(); |
|
| 189 | ||
| 190 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 191 | while ($row = mysqli_fetch_assoc($this->_result)) { |
|
| 192 | $data[] = $this->cast($row); |
|
| 193 | } |
|
| 194 | } |
|
| 195 | ||
| 196 | return $data; |
|
| 197 | } |
|
| 198 | ||
| 199 | /** |
|
| 200 | * fetch all results, return via Arrayy |
|
| @@ 204-223 (lines=20) @@ | ||
| 201 | * |
|
| 202 | * @return Arrayy |
|
| 203 | */ |
|
| 204 | public function fetchAllArrayy() |
|
| 205 | { |
|
| 206 | // init |
|
| 207 | $data = array(); |
|
| 208 | ||
| 209 | if ( |
|
| 210 | $this->_result |
|
| 211 | && |
|
| 212 | !$this->is_empty() |
|
| 213 | ) { |
|
| 214 | $this->reset(); |
|
| 215 | ||
| 216 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 217 | while ($row = mysqli_fetch_assoc($this->_result)) { |
|
| 218 | $data[] = $this->cast($row); |
|
| 219 | } |
|
| 220 | } |
|
| 221 | ||
| 222 | return Arrayy::create($data); |
|
| 223 | } |
|
| 224 | ||
| 225 | /** |
|
| 226 | * is_empty |
|