| @@ 112-118 (lines=7) @@ | ||
| 109 | * @param array $options Options for the find command  | 
                                |
| 110 | * @return MongoGridFSCursor A MongoGridFSCursor  | 
                                |
| 111 | */  | 
                                |
| 112 | public function find(array $query = [], array $fields = [])  | 
                                |
| 113 |     { | 
                                |
| 114 | $cursor = new MongoGridFSCursor($this, $this->db->getConnection(), (string) $this, $query, $fields);  | 
                                |
| 115 | $cursor->setReadPreference($this->getReadPreference());  | 
                                |
| 116 | ||
| 117 | return $cursor;  | 
                                |
| 118 | }  | 
                                |
| 119 | ||
| 120 | /**  | 
                                |
| 121 | * Returns a single file matching the criteria  | 
                                |
| @@ 432-438 (lines=7) @@ | ||
| 429 | * @param array $fields Fields of the results to return.  | 
                                |
| 430 | * @return MongoCursor  | 
                                |
| 431 | */  | 
                                |
| 432 | public function find(array $query = [], array $fields = [])  | 
                                |
| 433 |     { | 
                                |
| 434 | $cursor = new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields);  | 
                                |
| 435 | $cursor->setReadPreference($this->getReadPreference());  | 
                                |
| 436 | ||
| 437 | return $cursor;  | 
                                |
| 438 | }  | 
                                |
| 439 | ||
| 440 | /**  | 
                                |
| 441 | * Retrieve a list of distinct values for the given key across a collection  | 
                                |