function __construct(\DB\Mongo $db, $collection, $fields = NULL) { $this->db = $db; $this->collection = $db->selectcollection($collection); $this->fields = $fields; $this->reset(); }
public function __construct($collection = null) { $db = Base::instance()->get($this->connection); parent::__construct($db, $collection ?: $this->collection); }