Pagination
Table of Contents
- $aClass : string
- a tag class.
- $baseUrl : string
- Site base url.
- $current : int
- Current page.
- $itemPerPage : int
- Item per page.
- $liClass : string
- li tag class.
- $totalItems : int
- Total items.
- $ulCLass : string
- ul tag class.
- $urlAppend : string
- Url append.
- __construct() : mixed
- __construct.
- __toString() : mixed
- __Tostring.
- generateLink() : mixed
- Generate pagination link.
- pagination() : mixed
- Generate the pagination.
- setBaseUrl() : object
- Set the base url.
- setCurrentPage() : bool
- Set the current page.
- setItmPerPage() : bool
- Set the per page item.
- setTotalItems() : bool
- Set the total items.
- setUrlAppend() : void
- Append the url.
Properties
$aClass
a tag class.
private
string
$aClass
Tags
$baseUrl
Site base url.
private
string
$baseUrl
Tags
$current
Current page.
private
int
$current
Tags
$itemPerPage
Item per page.
private
int
$itemPerPage
= 6
Tags
$liClass
li tag class.
private
string
$liClass
Tags
$totalItems
Total items.
private
int
$totalItems
Tags
$ulCLass
ul tag class.
private
string
$ulCLass
Tags
$urlAppend
Url append.
private
string
$urlAppend
Tags
Methods
__construct()
__construct.
public
__construct([mixed $total = 10 ][, (int) $perPage = 6 ][, (int) $current = 1 ][, (string) $urlAppend = '/' ][, mixed $ulCLass = 'pagination' ][, (string) $liClass = 'page-item' ][, (string) $aClass = 'page-link' ]) : mixed
Parameters
- $total : mixed = 10
- $perPage : (int) = 6
-
item in per page.
- $current : (int) = 1
-
current page.
- $urlAppend : (string) = '/'
-
sub url.
- $ulCLass : mixed = 'pagination'
- $liClass : (string) = 'page-item'
-
li class value.
- $aClass : (string) = 'page-link'
-
a class value
Tags
Return values
mixed —__toString()
__Tostring.
public
__toString() : mixed
Tags
Return values
mixed —generateLink()
Generate pagination link.
public
generateLink((int) $number) : mixed
Parameters
- $number : (int)
-
page number.
Tags
Return values
mixed —pagination()
Generate the pagination.
public
pagination() : mixed
Tags
Return values
mixed —setBaseUrl()
Set the base url.
public
setBaseUrl() : object
Tags
Return values
object —setCurrentPage()
Set the current page.
public
setCurrentPage((int) $current) : bool
Parameters
- $current : (int)
-
current page.
Tags
Return values
bool —setItmPerPage()
Set the per page item.
public
setItmPerPage(mixed $item) : bool
Parameters
- $item : mixed
Tags
Return values
bool —setTotalItems()
Set the total items.
public
setTotalItems((int) $items) : bool
Parameters
- $items : (int)
-
total item count.
Tags
Return values
bool —setUrlAppend()
Append the url.
public
setUrlAppend( $append) : void