\Charcoal\SourcePaginationInterface

Pagination Interface.

Summary

Methods
Constants
setData()
setPage()
page()
setNumPerPage()
numPerPage()
first()
last()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setData()

setData(array  $data) : \Charcoal\Source\Pagination

Parameters

array $data

The pagination data (page, num_per_page).

Returns

\Charcoal\Source\Pagination

Chainable

setPage()

setPage(integer  $page) : \Charcoal\Source\Pagination

Parameters

integer $page

The current page. Starts at 0.

Returns

\Charcoal\Source\Pagination

(Chainable)

page()

page() : integer

Returns

integer

setNumPerPage()

setNumPerPage(integer  $num) : \Charcoal\Source\Pagination

Parameters

integer $num

The number ot item to retrieve per page.

Throws

\Charcoal\Source\InvalidArgumentException

If the parameter is not numeric or < 0.

Returns

\Charcoal\Source\Pagination

(Chainable)

numPerPage()

numPerPage() : integer

Returns

integer

first()

first() : integer

Returns

integer

last()

last() : integer

Can be greater than the actual number of items to retrieve.

Returns

integer