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?
void
setBase (int $base)
Sets first page (base) number.
void
setItemCount (int $itemCount)
Sets the total number of items.
void
setItemsPerPage (int $itemsPerPage)
Sets the number of items to display on a single page.
void
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 119

getBase

public int getBase ()

Returns first page (base) number.

Output
int  

line 231

getCountdownOffset

public int getCountdownOffset ()

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

Output
int  

line 85

getFirstPage

public int getFirstPage ()

Returns first page number.

Output
int  

line 209

getItemCount

public int getItemCount ()

Returns the total number of items.

Output
int  

line 186

getItemsPerPage

public int getItemsPerPage ()

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

Output
int  

line 96

getLastPage

public int getLastPage ()

Returns last page number.

Output
int  

line 242

getLength

public int getLength ()

Returns the number of items on current page.

Output
int  

line 220

getOffset

public int getOffset ()

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

Output
int  

line 74

getPage

public int getPage ()

Returns current page number.

Output
int  

line 163

getPageCount

public int getPageCount ()

Returns the total number of pages.

Output
int  

line 130

getPageIndex

protected int getPageIndex ()

Returns zero-based page number.

Output
int  

line 141

isFirst

public bool isFirst ()

Is the current page the first one?

Output
bool  

line 152

isLast

public bool isLast ()

Is the current page the last one?

Output
bool  

line 108

setBase

public void setBase (int $base)

Sets first page (base) number.

Input
int $base
Output
void  

line 198

setItemCount

public void setItemCount (int $itemCount)

Sets the total number of items.

Input
int $itemCount (or FALSE as infinity)
Output
void  

line 175

setItemsPerPage

public void setItemsPerPage (int $itemsPerPage)

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

Input
int $itemsPerPage
Output
void  

line 63

setPage

public void setPage (int $page)

Sets current page number.

Input
int $page
Output
void