Documentation

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

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']

$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

$totalRecord

public int $totalRecord = 0

toplam kayıt

$items

private array<string|int, mixed> $items = []

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
$pageNum :
$text :
$is_current :
$is_disable :
$itemName : null = null
Return values
mixed

firstLast()

private firstLast() : mixed
Return values
mixed

parseUrl()

private parseUrl( $pageNum) : string|array<string|int, string>
Parameters
$pageNum :
Return values
string|array<string|int, string>

prevNext()

private prevNext() : mixed
Return values
mixed

Search results