Methods

Constructs instance.

__construct(\Zend\Stdlib\CallbackHandler | \Zend\Paginator\Adapter\callable $itemsCallback, \Zend\Stdlib\CallbackHandler | \Zend\Paginator\Adapter\callable $countCallback) 

Parameters

$itemsCallback

\Zend\Stdlib\CallbackHandler\Zend\Paginator\Adapter\callable

Callback to be executed to retrieve the items for a page.

$countCallback

\Zend\Stdlib\CallbackHandler\Zend\Paginator\Adapter\callable

Callback to be executed to retrieve the total number of items.

Returns the total number of items.

count() : int

Executes the {$countCallback}.

Returns

int

Returns an array of items for a page.

getItems(int $offset, int $itemCountPerPage) : array

Executes the {$itemsCallback}.

Parameters

$offset

int

Page offset

$itemCountPerPage

int

Number of items per page

Returns

array

 Properties

 

Callback to be executed to retrieve the total number of items.

$countCallback : \Zend\Stdlib\CallbackHandler

 

Callback to be executed to retrieve the items for a page.

$itemsCallback : \Zend\Stdlib\CallbackHandler