Exemplo n.º 1
0
 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"])));
 }
Exemplo n.º 2
0
 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();
 }