| @@ 250-256 (lines=7) @@ | ||
| 247 | return array_values($this->rows); |
|
| 248 | } |
|
| 249 | ||
| 250 | foreach ($this->rows as $row) { |
|
| 251 | $k = $row->$key; |
|
| 252 | ||
| 253 | if (!empty($k)) { |
|
| 254 | $rows[$k] = $row; |
|
| 255 | } |
|
| 256 | } |
|
| 257 | ||
| 258 | return $rows; |
|
| 259 | } |
|
| @@ 262-268 (lines=7) @@ | ||
| 259 | } |
|
| 260 | ||
| 261 | if ($key !== null) { |
|
| 262 | foreach ($this->rows as $row) { |
|
| 263 | $k = $row->$key; |
|
| 264 | ||
| 265 | if (!empty($k)) { |
|
| 266 | $rows[$k] = $row->$name; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | ||
| 270 | return $rows; |
|
| 271 | } |
|