Issues

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

Nice catch. This is a holdover from pre-release versions where page number, not offset, was used here.

This issue was already fixed, but apparently not closed...

Changing issues in preparation for the 1.7.0 release.