ZF-4716: Paginator_Adapter_Interface::getItems method is commented incorrectly.
Description
The comments for Zend_Paginator_Adapter_Interface claim that getItems-method should take $pageNumber as its first parameter. However, every adapter implementation and paginator itself use $offset as their first parameter.
Adapter_Interface method declaration and documentation read as follows: /** * Returns a collection of items for a page. * * @param integer $pageNumber Page number * @param integer $itemCountPerPage Number of items per page * @return mixed */ public function getItems($pageNumber, $itemCountPerPage);
While they should be something along the lines of: /** * Returns a collection of items for a page. * * @param integer $offset Offset from which to start displaying items * @param integer $itemCountPerPage Number of items per page * @return mixed */ public function getItems($offset, $itemCountPerPage);
Comments
Posted by Matthew Ratzloff (mratzloff) on 2008-10-28T17:28:43.000+0000
Nice catch. This is a holdover from pre-release versions where page number, not offset, was used here.
Posted by Jurrien Stutterheim (norm2782) on 2008-10-29T11:02:09.000+0000
This issue was already fixed, but apparently not closed...
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:28.000+0000
Changing issues in preparation for the 1.7.0 release.