interface LengthAwarePaginator implements Paginator (View source)

Methods

string
url(int $page)

Get the URL for a given page.

from Paginator
$this
appends(array|string $key, string|null $value = null)

Add a set of query string values to the paginator.

from Paginator
$this|string
fragment(string|null $fragment = null)

Get / set the URL fragment to be appended to URLs.

from Paginator
string|null
nextPageUrl()

The the URL for the next page, or null.

from Paginator
string|null
previousPageUrl()

Get the URL for the previous page, or null.

from Paginator
array
items()

Get all of the items being paginated.

from Paginator
int
firstItem()

Get the "index" of the first item being paginated.

from Paginator
int
lastItem()

Get the "index" of the last item being paginated.

from Paginator
int
perPage()

Determine how many items are being shown per page.

from Paginator
int
currentPage()

Determine the current page being paginated.

from Paginator
bool
hasPages()

Determine if there are enough items to split into multiple pages.

from Paginator
bool
hasMorePages()

Determine if there is more items in the data store.

from Paginator
bool
isEmpty()

Determine if the list of items is empty or not.

from Paginator
string
render(Presenter $presenter = null)

Render the paginator using a given Presenter.

from Paginator
int
total()

Determine the total number of items in the data store.

int
lastPage()

Get the page number of the last available page.

Details

string url(int $page)

Get the URL for a given page.

Parameters

int $page

Return Value

string

$this appends(array|string $key, string|null $value = null)

Add a set of query string values to the paginator.

Parameters

array|string $key
string|null $value

Return Value

$this

$this|string fragment(string|null $fragment = null)

Get / set the URL fragment to be appended to URLs.

Parameters

string|null $fragment

Return Value

$this|string

string|null nextPageUrl()

The the URL for the next page, or null.

Return Value

string|null

string|null previousPageUrl()

Get the URL for the previous page, or null.

Return Value

string|null

array items()

Get all of the items being paginated.

Return Value

array

int firstItem()

Get the "index" of the first item being paginated.

Return Value

int

int lastItem()

Get the "index" of the last item being paginated.

Return Value

int

int perPage()

Determine how many items are being shown per page.

Return Value

int

int currentPage()

Determine the current page being paginated.

Return Value

int

bool hasPages()

Determine if there are enough items to split into multiple pages.

Return Value

bool

bool hasMorePages()

Determine if there is more items in the data store.

Return Value

bool

bool isEmpty()

Determine if the list of items is empty or not.

Return Value

bool

string render(Presenter $presenter = null)

Render the paginator using a given Presenter.

Parameters

Presenter $presenter

Return Value

string

int total()

Determine the total number of items in the data store.

Return Value

int

int lastPage()

Get the page number of the last available page.

Return Value

int