@@ 117-120 (lines=4) @@ | ||
114 | public function update($collection, $filters, $values) |
|
115 | { |
|
116 | $collection = $this->db->selectCollection($collection); |
|
117 | if (isset($filters['id'])) { |
|
118 | $filters['_id'] = new MongoDBLib\BSON\ObjectID($filters['id']); |
|
119 | unset($filters['id']); |
|
120 | } |
|
121 | $query_filters = []; |
|
122 | if ($filters != null) { |
|
123 | $query_filters = ['$and' => self::buildFilter($filters)]; |
|
@@ 154-157 (lines=4) @@ | ||
151 | public function find($collection, $filters, $fields = null, $sort = null, $start = 0, $limit = 25, $debug = false) |
|
152 | { |
|
153 | $collection = $this->db->selectCollection($collection); |
|
154 | if (isset($filters['id'])) { |
|
155 | $filters['_id'] = new MongoDBLib\BSON\ObjectID($filters['id']); |
|
156 | unset($filters['id']); |
|
157 | } |
|
158 | $query_filters = []; |
|
159 | if ($filters != null) { |
|
160 | $query_filters = ['$and' => self::buildFilter($filters)]; |