class MongoCommandCursor implements MongoCursorInterface (View source)

Methods

mixed
current()

Return the current element

void
next()

Move forward to next element

mixed
key()

Return the key of the current element

bool
valid()

Checks if current position is valid

void
rewind()

Rewind the Iterator to the first element

batchSize(int $batchSize)

No description

bool
dead()

No description

array
info()

No description

array
getReadPreference()

No description

setReadPreference(string $read_preference, array $tags = null)

No description

timeout(int $ms)

No description

Details

mixed current()

Since: 5.0.0

Return the current element

Return Value

mixed

Can return any type.

void next()

Since: 5.0.0

Move forward to next element

Return Value

void

Any returned value is ignored.

mixed key()

Since: 5.0.0

Return the key of the current element

Return Value

mixed

TKey on success, or null on failure.

bool valid()

Since: 5.0.0

Checks if current position is valid

Return Value

bool

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

void rewind()

Since: 5.0.0

Rewind the Iterator to the first element

Return Value

void

Any returned value is ignored.

MongoCursorInterface batchSize(int $batchSize)

No description

Parameters

int $batchSize

Return Value

MongoCursorInterface

bool dead()

No description

Return Value

bool

array info()

No description

Return Value

array

array getReadPreference()

No description

Return Value

array

MongoCursorInterface setReadPreference(string $read_preference, array $tags = null)

No description

Parameters

string $read_preference
array $tags

Return Value

MongoCursorInterface

MongoCursorInterface timeout(int $ms)

No description

Parameters

int $ms

Return Value

MongoCursorInterface