public function MongoDebugCollection::find in MongoDB 6
Same name and namespace in other branches
- 7 mongodb.module \MongoDebugCollection::find()
Performs a find() on the original cursor, wrapping it in debug() calls.
Parameters
array $query: The query criteria, as in the original MongoCollection::find().
array $fields: The query result fields, as in the original MongoCollection::find().
Return value
\MongoDebugCursor A new instance of a wrapped cursor.
File
- ./
mongodb.module, line 135 - A library of common mechanisms for modules using MongoDB.
Class
- MongoDebugCollection
- Class MongoDebugCollection wraps a MongoCollection with debug() instructions.
Code
public function find($query = array(), $fields = array()) {
debug('find');
debug($query);
debug($fields);
return new MongoDebugCursor($this->collection
->find($query, $fields));
}