Source for file Paginator.php
Documentation is available at Paginator.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 19: */
- 23: /**
- 24: * Paginating math.
- 25: *
- 29: */
- 31: {
- 46: /**
- 47: * Sets current page number.
- 50: */
- 52: {
- 54: }
- 58: /**
- 59: * Returns current page number.
- 61: */
- 63: {
- 65: }
- 69: /**
- 70: * Returns first page number.
- 72: */
- 74: {
- 76: }
- 80: /**
- 81: * Returns last page number.
- 83: */
- 85: {
- 87: }
- 91: /**
- 92: * Sets first page (base) number.
- 95: */
- 97: {
- 99: }
- 103: /**
- 104: * Returns first page (base) number.
- 106: */
- 108: {
- 110: }
- 114: /**
- 115: * Returns zero-based page number.
- 117: */
- 119: {
- 121: }
- 125: /**
- 126: * Is the current page the first one?
- 128: */
- 130: {
- 132: }
- 136: /**
- 137: * Is the current page the last one?
- 139: */
- 141: {
- 143: }
- 147: /**
- 148: * Returns the total number of pages.
- 150: */
- 152: {
- 154: }
- 158: /**
- 159: * Sets the number of items to display on a single page.
- 162: */
- 164: {
- 166: }
- 170: /**
- 171: * Returns the number of items to display on a single page.
- 173: */
- 175: {
- 177: }
- 181: /**
- 182: * Sets the total number of items.
- 185: */
- 187: {
- 189: }
- 193: /**
- 194: * Returns the total number of items.
- 196: */
- 198: {
- 200: }
- 204: /**
- 205: * Returns the absolute index of the first item on current page.
- 207: */
- 209: {
- 211: }
- 215: /**
- 216: * Returns the absolute index of the first item on current page in countdown paging.
- 218: */
- 220: {
- 222: }
- 226: /**
- 227: * Returns the number of items on current page.
- 229: */
- 231: {
- 232: return min($this->itemsPerPage, $this->itemCount - $this->getPageIndex() * $this->itemsPerPage);
- 233: }
- 237: /**
- 238: * Generates list of pages used for visual control. (experimental)
- 241: */
- 243: {
- 244: trigger_error('Paginator::getSteps() is deprecated; use template helper instead.', E_USER_WARNING);
- 256: }
- 258: }