ZF-4675: Zend_Paginator_Adapter_Interface::getItems has wrong parameters


The parameter definition for Zend_Paginator_Adapter_Interface::getItems is different to the ones for Zend_Paginator_Adapter_DbSelect and Zend_Paginator_Adapter_DbTableSelect.

The Interface definition is:

     * 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);

whereas the DbSelect definition is:

     * Returns an array of items for a page.
     * @param  integer $offset Page offset
     * @param  integer $itemCountPerPage Number of items per page
     * @return array
    public function getItems($offset, $itemCountPerPage)

I.e. the first parameter for the DbSelect is the offset, whereas for the Interface it is pageNumber. The call from $paginator->getItemsByPage() passes in the $offset, so this appears to be the correct usage.

I think the parameter definition in the interface should be changed


Resolved in revision 12071

Changing issues in preparation for the 1.7.0 release.