@@ 578-584 (lines=7) @@ | ||
575 | { |
|
576 | // use native php function if field without subdocument |
|
577 | if(false === strpos($fieldName, '.') && function_exists('array_column')) { |
|
578 | if($this->isResultAsArray()) { |
|
579 | $result = $this->findAll(); |
|
580 | } else { |
|
581 | $cursor = clone $this; |
|
582 | $result = $cursor->asArray()->findAll(); |
|
583 | unset($cursor); |
|
584 | } |
|
585 | ||
586 | return array_column($result, $fieldName, '_id'); |
|
587 | } |
|
@@ 601-607 (lines=7) @@ | ||
598 | */ |
|
599 | private function pluckDotNoteted($fieldName) |
|
600 | { |
|
601 | if($this->isResultAsArray()) { |
|
602 | $cursor = clone $this; |
|
603 | $result = $cursor->asObject()->findAll(); |
|
604 | unset($cursor); |
|
605 | } else { |
|
606 | $result = $this->findAll(); |
|
607 | } |
|
608 | ||
609 | $list = array(); |
|
610 | foreach($result as $key => $document) { |