protected function get_count($r) { $col = Collection::Model($this->model); $this->filterList($col); if (Input::has("q") && strlen(Input::get("q")) > 0) { $col->filter(Input::get("q")); } $count = $col->getCount(); Output::success(array('count' => intVal($count), 'limit' => $this->options["limit"], 'pages' => ceil(intVal($count) / $this->options["limit"]))); }
public function simpleSelect($where = array(), $params = array()) { $bdd = Bdd::getInstance(); return Collection::Model($this)->select(array_map(array($bdd, "quoteIdent"), array_keys($this->fields)))->where($where)->with($params)->modelData(); }