Class Paginator (namespace Nette)


Paginating math.

Object
   |
   --Paginator
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Paginator.php (line 42)
Public Method Summary
int
getBase ()
Returns first page (base) number.
int
Returns the absolute index of the first item on current page in countdown paging.
int
Returns first page number.
int
Returns the total number of items.
int
Returns the number of items to display on a single page.
int
Returns last page number.
int
Returns the number of items on current page.
int
Returns the absolute index of the first item on current page.
int
getPage ()
Returns current page number.
int
Returns the total number of pages.
bool
isFirst ()
Is the current page the first one?
bool
isLast ()
Is the current page the last one?
Paginator
setBase (int $base)
Sets first page (base) number.
Paginator
setItemCount (int $itemCount)
Sets the total number of items.
Paginator
setItemsPerPage (int $itemsPerPage)
Sets the number of items to display on a single page.
Paginator
setPage (int $page)
Sets current page number.
Protected Method Summary
protected int
Returns zero-based page number.
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()

Method Details

line 121

getBase

public int getBase ()

Returns first page (base) number.

Output
int  

line 235

getCountdownOffset

public int getCountdownOffset ()

Returns the absolute index of the first item on current page in countdown paging.

Output
int  

line 86

getFirstPage

public int getFirstPage ()

Returns first page number.

Output
int  

line 213

getItemCount

public int getItemCount ()

Returns the total number of items.

Output
int  

line 189

getItemsPerPage

public int getItemsPerPage ()

Returns the number of items to display on a single page.

Output
int  

line 97

getLastPage

public int getLastPage ()

Returns last page number.

Output
int  

line 246

getLength

public int getLength ()

Returns the number of items on current page.

Output
int  

line 224

getOffset

public int getOffset ()

Returns the absolute index of the first item on current page.

Output
int  

line 75

getPage

public int getPage ()

Returns current page number.

Output
int  

line 165

getPageCount

public int getPageCount ()

Returns the total number of pages.

Output
int  

line 132

getPageIndex

protected int getPageIndex ()

Returns zero-based page number.

Output
int  

line 143

isFirst

public bool isFirst ()

Is the current page the first one?

Output
bool  

line 154

isLast

public bool isLast ()

Is the current page the last one?

Output
bool  

line 109

setBase

public Paginator setBase (int $base)

Sets first page (base) number.

Input
int $base
Output
Paginator provides a fluent interface

line 201

setItemCount

public Paginator setItemCount (int $itemCount)

Sets the total number of items.

Input
int $itemCount (or FALSE as infinity)
Output
Paginator provides a fluent interface

line 177

setItemsPerPage

public Paginator setItemsPerPage (int $itemsPerPage)

Sets the number of items to display on a single page.

Input
int $itemsPerPage
Output
Paginator provides a fluent interface

line 63

setPage

public Paginator setPage (int $page)

Sets current page number.

Input
int $page
Output
Paginator provides a fluent interface