Pagination
in package
Table of Contents
- PATTERN = "{num}"
- $currentPage : int
- $firstLast : bool
- $jumpNavigationItems : int
- $language : array<string|int, mixed>
- $limit : int
- $maxNavigationItems : int
- $perPage : int
- $prevNext : bool
- $start : int
- $totalPage : int
- $totalRecord : int
- $itemNumber : int
- $items : array<string|int, mixed>
- $urlPattern : string
- __construct() : mixed
- __toString() : string
- buildPaginate() : array<string|int, mixed>
- navigation() : string
- addItem() : mixed
- firstLast() : mixed
- parseUrl() : string|array<string|int, string>
- prevNext() : mixed
Constants
PATTERN
public
mixed
PATTERN
= "{num}"
Properties
$currentPage
public
int
$currentPage
aktif sayfa no
$firstLast
public
bool
$firstLast
= true
ilk ve son butonları gösterilsin mi
$jumpNavigationItems
public
int
$jumpNavigationItems
= 10
$language
public
array<string|int, mixed>
$language
= ['prev' => 'Önceki', 'next' => 'Sonraki', 'first' => 'İlk Sayfa', 'last' => 'Son Sayfa']
$limit
public
int
$limit
sql miktar
$maxNavigationItems
public
int
$maxNavigationItems
= 4
aktif sayfa no sağ ve solunda ki buton sayısı
$perPage
public
int
$perPage
sayfada gösterilen sonuç sayısı
$prevNext
public
bool
$prevNext
= true
önceki ve sonraki butonları gösterilsin mi
$start
public
int
$start
sql başlangıç
$totalPage
public
int
$totalPage
toplam sayfa
$totalRecord
public
int
$totalRecord
= 0
toplam kayıt
$itemNumber
private
int
$itemNumber
= 0
$items
private
array<string|int, mixed>
$items
= []
$urlPattern
private
string
$urlPattern
Methods
__construct()
public
__construct(int $totalRecord[, int $currentPage = 1 ][, int $perPage = 20 ][, string $urlPattern = "?page={num}" ]) : mixed
Parameters
- $totalRecord : int
- $currentPage : int = 1
- $perPage : int = 20
- $urlPattern : string = "?page={num}"
Return values
mixed —__toString()
public
__toString() : string
Return values
string —buildPaginate()
public
buildPaginate([bool $shown_only = false ]) : array<string|int, mixed>
Parameters
- $shown_only : bool = false
-
true ise tüm sayfa bilgilerini hazırlar
Return values
array<string|int, mixed> —navigation()
public
navigation() : string
Return values
string —addItem()
private
addItem( $pageNum, $text, $is_current, $is_disable[, null $itemName = null ]) : mixed
Parameters
Return values
mixed —firstLast()
private
firstLast() : mixed
Return values
mixed —parseUrl()
private
parseUrl( $pageNum) : string|array<string|int, string>
Parameters
Return values
string|array<string|int, string> —prevNext()
private
prevNext() : mixed