protected fetchRows ( MongoDB\Driver\Cursor $cursor, boolean $all = true, string | callable $indexBy = null ) : array | boolean | ||
$cursor | MongoDB\Driver\Cursor | Mongo cursor instance to fetch data from. |
$all | boolean | whether to fetch all rows or only first one. |
$indexBy | string | callable | the column name or PHP callback, by which the query results should be indexed by. |
return | array | boolean | result. |