| @@ 107-126 (lines=20) @@ | ||
| 104 | * |
|
| 105 | * @return array |
|
| 106 | */ |
|
| 107 | public function fetchAllArray() |
|
| 108 | { |
|
| 109 | // init |
|
| 110 | $data = array(); |
|
| 111 | ||
| 112 | if ( |
|
| 113 | $this->_result |
|
| 114 | && |
|
| 115 | !$this->is_empty() |
|
| 116 | ) { |
|
| 117 | $this->reset(); |
|
| 118 | ||
| 119 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 120 | while ($row = mysqli_fetch_assoc($this->_result)) { |
|
| 121 | $data[] = $row; |
|
| 122 | } |
|
| 123 | } |
|
| 124 | ||
| 125 | return $data; |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * fetch all results, return via Arrayy |
|
| @@ 133-152 (lines=20) @@ | ||
| 130 | * |
|
| 131 | * @return Arrayy |
|
| 132 | */ |
|
| 133 | public function fetchAllArrayy() |
|
| 134 | { |
|
| 135 | // init |
|
| 136 | $data = array(); |
|
| 137 | ||
| 138 | if ( |
|
| 139 | $this->_result |
|
| 140 | && |
|
| 141 | !$this->is_empty() |
|
| 142 | ) { |
|
| 143 | $this->reset(); |
|
| 144 | ||
| 145 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 146 | while ($row = mysqli_fetch_assoc($this->_result)) { |
|
| 147 | $data[] = $row; |
|
| 148 | } |
|
| 149 | } |
|
| 150 | ||
| 151 | return Arrayy::create($data); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * is_empty |
|