ZF-3737: Setting itemCountPerPage after setCurrenPageNumber gives wrong results
If you call itemCountPerPage after setCurrentPageNumber you'll get wrong results. E.g.:
$paginator = Zend_Paginator::factory(array('item1', 'item2')); $paginator->setCurrentPageNumber(2) ->setItemCountPerPage(1);
Because the items per page is set to 10, the normalizePageNumber method which is called by setCurrentPageNumber will normalize the page number to 1. However, after setting the itemcount per page to 1, there are supposed to be two pages. However, the setCurrenPageNumber method already set the page number to 1.