Class Paginator (namespace Nette)


Paginating math.

Object
   |
   --Paginator
Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Paginator.php (line 34)
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 113

getBase

public int getBase ()

Returns first page (base) number.

Output
int  

line 227

getCountdownOffset

public int getCountdownOffset ()

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

Output
int  

line 78

getFirstPage

public int getFirstPage ()

Returns first page number.

Output
int  

line 205

getItemCount

public int getItemCount ()

Returns the total number of items.

Output
int  

line 181

getItemsPerPage

public int getItemsPerPage ()

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

Output
int  

line 89

getLastPage

public int getLastPage ()

Returns last page number.

Output
int  

line 238

getLength

public int getLength ()

Returns the number of items on current page.

Output
int  

line 216

getOffset

public int getOffset ()

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

Output
int  

line 67

getPage

public int getPage ()

Returns current page number.

Output
int  

line 157

getPageCount

public int getPageCount ()

Returns the total number of pages.

Output
int  

line 124

getPageIndex

protected int getPageIndex ()

Returns zero-based page number.

Output
int  

line 135

isFirst

public bool isFirst ()

Is the current page the first one?

Output
bool  

line 146

isLast

public bool isLast ()

Is the current page the last one?

Output
bool  

line 101

setBase

public Paginator setBase (int $base)

Sets first page (base) number.

Input
int $base
Output
Paginator provides a fluent interface

line 193

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 169

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 55

setPage

public Paginator setPage (int $page)

Sets current page number.

Input
int $page
Output
Paginator provides a fluent interface