class PaginationFactory implements PaginationFactoryInterface

Pagination factory.

Properties

protected Request $request Request instance.
protected array $options Options.
protected URLBuilder $urlBuilder URL builder instance.
protected ViewFactory $viewFactory View factory instance.

Methods

__construct(Request $request, array $options = [])

Constructor.

setURLBuilder(URLBuilder $urlBuilder)

Sets the URL builder instance.

setViewFactory(ViewFactory $viewFactory)

Sets the view factory builder instance.

create(int $items, int|null $itemsPerPage = null, array $options = [])

Creates and returns a pagination instance.

Details

at line 55
__construct(Request $request, array $options = [])

Constructor.

Parameters

Request $request Request
array $options Options

at line 67
setURLBuilder(URLBuilder $urlBuilder)

Sets the URL builder instance.

Parameters

URLBuilder $urlBuilder URL builder instance

at line 77
setViewFactory(ViewFactory $viewFactory)

Sets the view factory builder instance.

Parameters

ViewFactory $viewFactory View factory instance

at line 85
PaginationInterface create(int $items, int|null $itemsPerPage = null, array $options = [])

Creates and returns a pagination instance.

Parameters

int $items Number of items
int|null $itemsPerPage Number of items per page
array $options Pagination options

Return Value

PaginationInterface