Add Range to Paginator like this
use Phalcon\Paginator\Adapter\Model as Paginate;
$page = new Paginate(
array(
"data" => Class::find(),
"limit" => 40,
"page" => 1,
"rangeLength" => 5 //Add range length
)
);
And $page->getPaginate() returned
Array[11]
items => Array[40]
...
first => "1"
before => "1"
current => "1"
last => "5"
next => "2"
limit => "40"
rangeLength => "5"
totalPages => "5"
totalItems => "200"
range => Array[5]
0 => "1"
1 => "2"
2 => "3"
3 => "4"
4 => "5"
Probably necessary combine all of the variables in the array pagination
Array[11]
items => Array[40]
...
pagination = Array (10)
first => "1"
before => "1"
current => "1"
last => "5"
next => "2"
limit => "40"
rangeLength => "5"
totalPages => "5"
totalItems => "200"
range => Array[5]
0 => "1"
1 => "2"
2 => "3"
3 => "4"
4 => "5"