php namespace Redozote class Paginator extends Phalcon Paginator Adapt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?php namespace Redozote;
class Paginator extends \Phalcon\Paginator\Adapter\Model {
public function __construct($data, $currentPage, $limit) {
$currentPage = $currentPage ? $currentPage : 1;
parent::__construct(array(
array(
'data' => $data,
'limit' => 4,
'page' => $currentPage
)
));
$this->paginate = $this->getPaginate();
}
}