| @@ 111-117 (lines=7) @@ | ||
| 108 | * @param array $options Options for the find command  | 
                                |
| 109 | * @return MongoGridFSCursor A MongoGridFSCursor  | 
                                |
| 110 | */  | 
                                |
| 111 | public function find(array $query = [], array $fields = [])  | 
                                |
| 112 |     { | 
                                |
| 113 | $cursor = new MongoGridFSCursor($this, $this->db->getConnection(), (string) $this, $query, $fields);  | 
                                |
| 114 | $cursor->setReadPreference($this->getReadPreference());  | 
                                |
| 115 | ||
| 116 | return $cursor;  | 
                                |
| 117 | }  | 
                                |
| 118 | ||
| 119 | /**  | 
                                |
| 120 | * Returns a single file matching the criteria  | 
                                |
| @@ 450-456 (lines=7) @@ | ||
| 447 | * @param array $fields Fields of the results to return.  | 
                                |
| 448 | * @return MongoCursor  | 
                                |
| 449 | */  | 
                                |
| 450 | public function find(array $query = [], array $fields = [])  | 
                                |
| 451 |     { | 
                                |
| 452 | $cursor = new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields);  | 
                                |
| 453 | $cursor->setReadPreference($this->getReadPreference());  | 
                                |
| 454 | ||
| 455 | return $cursor;  | 
                                |
| 456 | }  | 
                                |
| 457 | ||
| 458 | /**  | 
                                |
| 459 | * Retrieve a list of distinct values for the given key across a collection  | 
                                |