(PECL mongo >=1.5.0)
Examples:
Adding options to MongoCommandCursor

A MongoCommandCursor has two "life stages": pre- and post- command. When a cursor is created, it has not yet contacted the database, so it is in its pre-command state. When the client first attempts to get a result (by calling MongoCommandCursor::rewind(), directly or indirectly), the cursor moves into the post-command state.

The command cursor's batch size and socket timeout may be configured in both the pre- and post- command states.

<?php

$cursor = new MongoCommandCursor(...);

$cursor = $cursor->batchSize( 4 );

foreach ($cursor as $result) {
    var_dump($result);
}
?>

MongoCommandCursor::setReadPreference

(PECL mongo >=1.6.0) Set the read preference for this command

2016-02-24 16:20:47
MongoCommandCursor::dead

(PECL mongo >=1.5.0) Checks if there are results that have not yet been sent from the database

2016-02-24 16:20:47
MongoCommandCursor::getReadPreference

(PECL mongo >=1.6.0) Get the read preference for this command

2016-02-24 16:20:47
MongoCommandCursor::createFromDocument

(PECL mongo >=1.5.0) Create a new command cursor from an existing command response document

2016-02-24 16:20:47
MongoCommandCursor::rewind

(PECL mongo >=1.5.0) Executes the command and resets the cursor to the start of the result set

2016-02-24 16:20:47
MongoCommandCursor::timeout

(PECL mongo >=1.6.0) Sets a client-side timeout for this command

2016-02-24 16:20:48
MongoCommandCursor::info

(PECL mongo >=1.5.0) Gets information about the cursor's creation and iteration

2016-02-24 16:20:47
MongoCommandCursor::valid

(PECL mongo >=1.5.0) Checks if the cursor is reading a valid result.

2016-02-24 16:20:48
MongoCommandCursor::__construct

(PECL mongo >=1.5.0) Create a new command cursor

2016-02-24 16:20:46
MongoCommandCursor::next

(PECL mongo >=1.5.0) Advances the cursor to the next result

2016-02-24 16:20:47