public function find($collectionName, $filter = [], $sort = [], $limit = 0, $skip = 0, array $options = []) { $options += ['limit' => $limit, 'skip' => $skip, 'sort' => $sort]; $result = $this->bridge->find($this->cName($collectionName), $filter, $options)->toArray(); $data = []; /* @var $r BSONDocument */ foreach ($result as $r) { $data[] = iterator_to_array($r->getIterator()); } return $data; }
public function find($collectionName, $filter = [], $sort = [], $limit = 0, $skip = 0, array $options = []) { $options += ['limit' => $limit, 'skip' => $skip, 'sort' => $sort]; return $this->bridge->find($this->cName($collectionName), $filter, $options); }