Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of PHP Library Manual, refer to the upgrade documentation.

Result Classes

MongoDB\ChangeStream

New in version 1.3.

Definition

MongoDB\ChangeStream

This class extends PHP’s Iterator interface. An instance of this class is returned by MongoDB\Client::watch(), MongoDB\Database::watch(), and MongoDB\Collection::watch().

This class allows for iteration of events in a change stream. It also allows iteration to automatically resume after certain errors, such as a replica set failover.


MongoDB\MapReduceResult

New in version 1.2.

Definition

MongoDB\MapReduceResult

This class extends PHP’s IteratorAggregate interface. An instance of this class is returned by MongoDB\Collection::mapReduce().

This class allows for iteration of map-reduce results irrespective of the output method (e.g. inline, collection). It also provides access to command statistics.