| @@ 115-121 (lines=7) @@ | ||
| 112 | * @param array $options Options for the find command |
|
| 113 | * @return MongoGridFSCursor A MongoGridFSCursor |
|
| 114 | */ |
|
| 115 | public function find(array $query = [], array $fields = []) |
|
| 116 | { |
|
| 117 | $cursor = new MongoGridFSCursor($this, $this->db->getConnection(), (string) $this, $query, $fields); |
|
| 118 | $cursor->setReadPreference($this->getReadPreference()); |
|
| 119 | ||
| 120 | return $cursor; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * Returns a single file matching the criteria |
|
| @@ 461-467 (lines=7) @@ | ||
| 458 | * @param array $fields Fields of the results to return. |
|
| 459 | * @return MongoCursor |
|
| 460 | */ |
|
| 461 | public function find(array $query = [], array $fields = []) |
|
| 462 | { |
|
| 463 | $cursor = new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields); |
|
| 464 | $cursor->setReadPreference($this->getReadPreference()); |
|
| 465 | ||
| 466 | return $cursor; |
|
| 467 | } |
|
| 468 | ||
| 469 | /** |
|
| 470 | * Retrieve a list of distinct values for the given key across a collection |
|