| @@ 606-612 (lines=7) @@ | ||
| 603 | } |
|
| 604 | ||
| 605 | // use native php function if field without embedded document |
|
| 606 | if ($this->isResultAsArray) { |
|
| 607 | $result = $this->findAll(); |
|
| 608 | } else { |
|
| 609 | $cursor = clone $this; |
|
| 610 | $result = $cursor->asArray()->findAll(); |
|
| 611 | unset($cursor); |
|
| 612 | } |
|
| 613 | ||
| 614 | return array_column($result, $fieldName, '_id'); |
|
| 615 | ||
| @@ 626-632 (lines=7) @@ | ||
| 623 | */ |
|
| 624 | private function pluckDotNotated($fieldName) |
|
| 625 | { |
|
| 626 | if ($this->isResultAsArray) { |
|
| 627 | $cursor = clone $this; |
|
| 628 | $result = $cursor->asObject()->findAll(); |
|
| 629 | unset($cursor); |
|
| 630 | } else { |
|
| 631 | $result = $this->findAll(); |
|
| 632 | } |
|
| 633 | ||
| 634 | $list = array(); |
|
| 635 | foreach($result as $key => $document) { |
|