Sokil\Mongo\Cursor::pluck PHP Метод

pluck() публичный Метод

Return the values from a single field in the result set of documents
public pluck ( string $fieldName ) : array
$fieldName string
Результат array
    public function pluck($fieldName)
    {
        // use native php function if field without subdocument
        if (false === strpos($fieldName, '.') && function_exists('array_column')) {
            if ($this->isResultAsArray()) {
                $result = $this->findAll();
            } else {
                $cursor = clone $this;
                $result = $cursor->asArray()->findAll();
                unset($cursor);
            }
            return array_column($result, $fieldName, '_id');
        }
        // if field with subdocument or native php function not exists
        return $this->pluckDotNoteted($fieldName);
    }