\CGExtensions\querypagination

A class to assist in building a paginator navigation for the results of a query.

Summary

Methods
Properties
Constants
__construct()
get_pagelist()
get_pagehash()
$pagecount
$page
$
$
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$pagecount

$pagecount : integer

The number of pages

Type

integer

$page

$page : integer

The current page number (one based)

Type

integer

$

$ : integer

pagelimit The page limit from the query object

Type

integer

$

$ : integer

totalroas The total matching rows for the resultset (independent of limit or offset)

Type

integer

Methods

get_pagelist()

get_pagelist(integer  $surround = 5) : array<mixed,integer>

Get a list of page numbers suitable for using in a loop to build a navigation list.

This method will use optimization to ensure that the number of items returned in the list will never grow too large

Parameters

integer $surround
  • The number of page numbers to surround the current page with.

Returns

array<mixed,integer>

get_pagehash()

get_pagehash(integer  $surround = 5) : array

Get a hash of page numbers suitable for using in a loop to build a navigation list.

Parameters

integer $surround

The number of pages around the current page (and the beginning and end) to return.

Returns

array