| @@ 615-621 (lines=7) @@ | ||
| 612 | } |
|
| 613 | ||
| 614 | // use native php function if field without embedded document |
|
| 615 | if ($this->isResultAsArray) { |
|
| 616 | $result = $this->findAll(); |
|
| 617 | } else { |
|
| 618 | $cursor = clone $this; |
|
| 619 | $result = $cursor->asArray()->findAll(); |
|
| 620 | unset($cursor); |
|
| 621 | } |
|
| 622 | ||
| 623 | return array_column($result, $fieldName, '_id'); |
|
| 624 | ||
| @@ 635-641 (lines=7) @@ | ||
| 632 | */ |
|
| 633 | private function pluckDotNotated($fieldName) |
|
| 634 | { |
|
| 635 | if ($this->isResultAsArray) { |
|
| 636 | $cursor = clone $this; |
|
| 637 | $result = $cursor->asObject()->findAll(); |
|
| 638 | unset($cursor); |
|
| 639 | } else { |
|
| 640 | $result = $this->findAll(); |
|
| 641 | } |
|
| 642 | ||
| 643 | $list = array(); |
|
| 644 | foreach($result as $key => $document) { |
|