Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Diagnostics
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
      • Diagnostics
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • PhpGenerator
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
  • NetteModule
  • none

Classes

  • Arrays
  • Callback
  • FileSystem
  • Finder
  • Html
  • Json
  • LimitedScope
  • MimeTypeDetector
  • Neon
  • NeonEntity
  • Paginator
  • Strings
  • Validators

Exceptions

  • AssertionException
  • JsonException
  • NeonException
  • RegexpException
  • TokenizerException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Paginator

Paginating math.

Nette\Object
Extended by Nette\Utils\Paginator
Namespace: Nette\Utils
Author: David Grudl
Located at Utils/Paginator.php
Methods summary
public Nette\Utils\Paginator
# setPage( integer $page )

Sets current page number.

Sets current page number.

Parameters

$page
integer

Returns

Nette\Utils\Paginator
public integer
# getPage( )

Returns current page number.

Returns current page number.

Returns

integer
public integer
# getFirstPage( )

Returns first page number.

Returns first page number.

Returns

integer
public integer|null
# getLastPage( )

Returns last page number.

Returns last page number.

Returns

integer|null
public Nette\Utils\Paginator
# setBase( integer $base )

Sets first page (base) number.

Sets first page (base) number.

Parameters

$base
integer

Returns

Nette\Utils\Paginator
public integer
# getBase( )

Returns first page (base) number.

Returns first page (base) number.

Returns

integer
protected integer
# getPageIndex( )

Returns zero-based page number.

Returns zero-based page number.

Returns

integer
public boolean
# isFirst( )

Is the current page the first one?

Is the current page the first one?

Returns

boolean
public boolean
# isLast( )

Is the current page the last one?

Is the current page the last one?

Returns

boolean
public integer|null
# getPageCount( )

Returns the total number of pages.

Returns the total number of pages.

Returns

integer|null
public Nette\Utils\Paginator
# setItemsPerPage( integer $itemsPerPage )

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

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

Parameters

$itemsPerPage
integer

Returns

Nette\Utils\Paginator
public integer
# getItemsPerPage( )

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

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

Returns

integer
public Nette\Utils\Paginator
# setItemCount( integer $itemCount )

Sets the total number of items.

Sets the total number of items.

Parameters

$itemCount
integer
(or NULL as infinity)

Returns

Nette\Utils\Paginator
public integer|null
# getItemCount( )

Returns the total number of items.

Returns the total number of items.

Returns

integer|null
public integer
# getOffset( )

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

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

Returns

integer
public integer|null
# getCountdownOffset( )

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

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

Returns

integer|null
public integer|null
# getLength( )

Returns the number of items on current page.

Returns the number of items on current page.

Returns

integer|null
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Magic properties summary
public integer $page
#
public integer $base
#
public integer $itemsPerPage
#
public integer|null $itemCount
#
public read-only integer $firstPage
#
public read-only integer|null $lastPage
#
public read-only boolean $first
#
public read-only boolean $last
#
public read-only integer|null $pageCount
#
public read-only integer $offset
#
public read-only integer|null $countdownOffset
#
public read-only integer|null $length
#
Magic properties inherited from Nette\Object
$reflection
Nette 2.1 API documentation generated by ApiGen 2.8.0