24 $auto=(!isset($this->row_count));
28 foreach ($objects as $o){
32 $this->page_count = 0;
38 $this->page_count = (int)ceil(
$row_count / $this->items_per_page);
39 $this->visible=$this->page_count>1;
40 if($this->page > $this->page_count+1) {
45 $offset = ($this->page - 1) * $this->items_per_page;
46 return array_slice($os, $offset,$this->items_per_page);
83 $middle= (int)ceil(($this->pages_visibles-1)/ 2);
84 $first=$this->page-$middle;
88 $last=$first+$this->pages_visibles-1;
89 if($last>$this->page_count){
92 return \range($first, $last);