final class PaginationResult (View source)

Couples the rows of one page with the state required to navigate its result set.

Methods

__construct(array $items, PaginationState $state)

Initializes a page's rows and its corresponding navigation state.

array
items()

Returns the rows belonging to the current page.

array
state()

Returns the immutable navigation state for these rows.

Details

__construct

__construct(array $items, PaginationState $state)

Initializes a page's rows and its corresponding navigation state.

Parameters

array $items
PaginationState $state

items

array items()

Returns the rows belonging to the current page.

Return Value

array

state

Returns the immutable navigation state for these rows.

Return Value

PaginationState