| @@ 512-523 (lines=12) @@ | ||
| 509 | } |
|
| 510 | ||
| 511 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 512 | while ($row = $this->fetch_assoc()) { |
|
| 513 | $classTmp = clone $classTmpOrig; |
|
| 514 | $row = $this->cast($row); |
|
| 515 | foreach ($row as $key => $value) { |
|
| 516 | if ($class === '\stdClass') { |
|
| 517 | $classTmp->{$key} = $value; |
|
| 518 | } else { |
|
| 519 | $propertyAccessor->setValue($classTmp, $key, $value); |
|
| 520 | } |
|
| 521 | } |
|
| 522 | $data[] = $classTmp; |
|
| 523 | } |
|
| 524 | ||
| 525 | return $data; |
|
| 526 | } |
|
| @@ 576-587 (lines=12) @@ | ||
| 573 | } |
|
| 574 | ||
| 575 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
| 576 | while ($row = $this->fetch_assoc()) { |
|
| 577 | $classTmp = clone $classTmpOrig; |
|
| 578 | $row = $this->cast($row); |
|
| 579 | foreach ($row as $key => $value) { |
|
| 580 | if ($class === '\stdClass') { |
|
| 581 | $classTmp->{$key} = $value; |
|
| 582 | } else { |
|
| 583 | $propertyAccessor->setValue($classTmp, $key, $value); |
|
| 584 | } |
|
| 585 | } |
|
| 586 | yield $classTmp; |
|
| 587 | } |
|
| 588 | } |
|
| 589 | ||
| 590 | /** |
|