24 $this->_controller = $controller;
35 public function trans($column,$key,$value,$params =
null){
45 public function exists($key,$value,$params =
null){
64 public function search($search,
$order =
null,$params =
null,$offset = 0,$limit =
null){
65 $records = $this->
_search($search,
$order,$params,$offset,$limit);
66 if($this->format) array_walk($records,$this->format);
70 protected function _totals($search,$totals,$params){
81 public function totals($search,$totals,$params =
null){
82 $totals = $this->
_totals($search,$totals,$params);
83 if($this->format) call_user_func_array($this->format,[&$totals,
true]);
87 protected function _group($search,$group,$column,$total,$limit,$params){
100 public function group($search,$group,$column,$total,$limit =
null,$params =
null){
101 $totals = $this->
_group($search,$group,$column,$total,$limit,$params);
102 if($this->format)
foreach($totals as $key => $value){
103 $value = [$column => [$total => $value]];
104 call_user_func_array($this->format,[&$value,
true]);
105 $totals[$key] = $value[$column][$total];