Interface PagerInterface

Summary

Fully Qualified Name: CodeIgniter\Pager\PagerInterface

Description

Expected behavior for a Pager

Methods

Name Description Defined By
getCurrentPage() Returns the number of the current page of results. PagerInterface
getDetails() Returns an array with details about the results, including total, per_page, current_page, last_page, next_url, prev_url, from, to. PagerInterface
getFirstPage() Returns the first page. PagerInterface
getLastPage() Returns the last page, if we have a total that we can calculate with. PagerInterface
getNextPageURI() Returns the full URI to the next page of results, or null. PagerInterface
getPageCount() Returns the total number of pages. PagerInterface
getPageURI() Returns the URI for a specific page for the specified group. PagerInterface
getPerPage() Returns the number of results per page that should be shown. PagerInterface
getPreviousPageURI() Returns the full URL to the previous page of results, or null. PagerInterface
hasMore() Tells whether this group of results has any more pages of results. PagerInterface
links() Handles creating and displaying the PagerInterface
makeLinks() Allows for a simple, manual, form of pagination where all of the data is provided by the user. The URL is the current URI. PagerInterface
setPath() Sets the path that an aliased group of links will use. PagerInterface
simpleLinks() Creates simple Next/Previous links, instead of full pagination. PagerInterface
store() Stores a set of pagination data for later display. Most commonly used by the model to automate the process. PagerInterface

Method Details

getCurrentPage()

Returns the number of the current page of results.

Parameter Name Type Description
$group string|null

Returns: int

getDetails()

Returns an array with details about the results, including total, per_page, current_page, last_page, next_url, prev_url, from, to.

Does not include the actual data. This data is suitable for adding a 'data' object to with the result set and converting to JSON.

Parameter Name Type Description
$group string

Returns: array

getFirstPage()

Returns the first page.

Parameter Name Type Description
$group string

Returns: int

getLastPage()

Returns the last page, if we have a total that we can calculate with.

Parameter Name Type Description
$group string

Returns: int|null

getNextPageURI()

Returns the full URI to the next page of results, or null.

Parameter Name Type Description
$group string

Returns: string|null

getPageCount()

Returns the total number of pages.

Parameter Name Type Description
$group string|null

Returns: int

getPageURI()

Returns the URI for a specific page for the specified group.

Parameter Name Type Description
$page int|null
$group string
$returnObject bool

Returns: string|\CodeIgniter\HTTP\URI

getPerPage()

Returns the number of results per page that should be shown.

Parameter Name Type Description
$group string

Returns: int

getPreviousPageURI()

Returns the full URL to the previous page of results, or null.

Parameter Name Type Description
$group string

Returns: string|null

hasMore()

Tells whether this group of results has any more pages of results.

Parameter Name Type Description
$group string|null

Returns: bool

links()

Handles creating and displaying the

Parameter Name Type Description
$group string
$template string The

Returns: string

makeLinks()

Allows for a simple, manual, form of pagination where all of the data is provided by the user. The URL is the current URI.

Parameter Name Type Description
$page int
$perPage int
$total int
$template string The

Returns: string

setPath()

Sets the path that an aliased group of links will use.

Parameter Name Type Description
$path string
$group string

Returns: mixed

simpleLinks()

Creates simple Next/Previous links, instead of full pagination.

Parameter Name Type Description
$group string
$template string

Returns: string

store()

Stores a set of pagination data for later display. Most commonly used by the model to automate the process.

Parameter Name Type Description
$group string
$page int
$perPage int
$total int

Returns: mixed

Top