1 | <?php |
||
16 | class MongoCollection |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Creates a new collection |
||
21 | * |
||
22 | * @param MongoDB $db - Parent database. |
||
23 | * @param string $name - |
||
24 | * |
||
25 | * @return - Returns a new collection object. |
||
|
|||
26 | */ |
||
27 | public function __construct(MongoDB $db, $name) |
||
35 | |||
36 | /** |
||
37 | * Counts the number of documents in this collection |
||
38 | * |
||
39 | * @param array $query - Associative array or object with fields to |
||
40 | * match. |
||
41 | * @param int $limit - Specifies an upper limit to the number returned. |
||
42 | * @param int $skip - Specifies a number of results to skip before |
||
43 | * starting the count. |
||
44 | * |
||
45 | * @return int - Returns the number of documents matching the query. |
||
46 | */ |
||
47 | public function count(array $query = [], $limit = 0, $skip = 0) |
||
73 | |||
74 | /** |
||
75 | * Queries this collection, returning a for the result set |
||
76 | * |
||
77 | * @param array $query - The fields for which to search. MongoDB's |
||
78 | * query language is quite extensive. |
||
79 | * @param array $fields - Fields of the results to return. |
||
80 | * |
||
81 | * @return MongoCursor - Returns a cursor for the search results. |
||
82 | */ |
||
83 | public function find(array $query = [], array $fields = []) |
||
87 | |||
88 | /** |
||
89 | * Queries this collection, returning a single element |
||
90 | * |
||
91 | * @param array $query - The fields for which to search. MongoDB's |
||
92 | * query language is quite extensive. |
||
93 | * @param array $fields - Fields of the results to return. |
||
94 | * |
||
95 | * @return array - Returns record matching the search or NULL. |
||
96 | */ |
||
97 | public function findOne($query = [], array $fields = []) |
||
103 | |||
104 | } |
||
105 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.