'delta' => 8, // for 'Jumping'-style a lower number is better
'append' => true,
//'separator' => ' | ',
'clearIfVoid' => false,
'urlVar' => 'entrant',
'useSessions' => true,
'closeSession' => true,
//'mode' => 'Sliding', //try switching modes
'mode' => 'Jumping',
);
$pager = & Pager::factory($params);
$page_data = $pager->getPageData();
$links = $pager->getLinks();
var_dump($links);
I am get the error like this
Fuel\Core\PhpErrorException [ Runtime Notice ]: Non-static method Pager::factory() should not be called statically, assuming $this from incompatible context
The Fuel framework doesn't have a class called Pager, so I don't know what that is.
It does have a class called Pagination. From the methods used I assume Pager is some sort of extension for it, but written for a very old version of the framework (given the fact it uses 'factory'). So changes are you are running into some sort of version incompatibility.
I am agree with you that message is so clear, but when I am try to change using $this context , I got the errors to using static method, that was so weird
this my code
$pager = new Pager();
$pager->factory($params);
after run
Fuel\Core\PhpErrorException [ User Error ]: Pager constructor is deprecated. You must use the "Pager::factory($params)" method instead of "new Pager($params)"
I don't know that happend from framework or my php version.
The problem of this message is that this Pager class is a piece of antique PHP4 rubbish...
In PHP4, you had to define a method with the same name as the class, and this method was called as a constructor. In PHP5, your constructor method has to be called __construct.
Also, late PHP4 and early PHP5 didn't care about static and non-static, so you didn't get the warning. But in current PHP versions, you no longer call non-static method statically.