@@ 94-100 (lines=7) @@ | ||
91 | * @param array $fields Fields to return |
|
92 | * @return MongoGridFSCursor A MongoGridFSCursor |
|
93 | */ |
|
94 | public function find(array $query = array(), array $fields = array()) |
|
95 | { |
|
96 | $cursor = new MongoGridFSCursor($this, $this->db->getConnection(), (string)$this, $query, $fields); |
|
97 | $cursor->setReadPreference($this->getReadPreference()); |
|
98 | ||
99 | return $cursor; |
|
100 | } |
|
101 | ||
102 | /** |
|
103 | * Stores a file in the database |
@@ 385-391 (lines=7) @@ | ||
382 | * @param array $fields Fields of the results to return. |
|
383 | * @return MongoCursor |
|
384 | */ |
|
385 | public function find(array $query = [], array $fields = []) |
|
386 | { |
|
387 | $cursor = new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields); |
|
388 | $cursor->setReadPreference($this->getReadPreference()); |
|
389 | ||
390 | return $cursor; |
|
391 | } |
|
392 | ||
393 | /** |
|
394 | * Retrieve a list of distinct values for the given key across a collection |