Mongolid\Cursor\EmbeddedCursor::all PHP Method

all() public method

Convert the cursor instance to an array of Items.
public all ( ) : array
return array
    public function all() : array
    {
        foreach ($this as $item) {
            $results[] = $item;
        }
        return $results ?? [];
    }