Source for file Paginator.php
Documentation is available at Paginator.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * Paginating math.
- 17: *
- 20: *
- 33: */
- 35: {
- 50: /**
- 51: * Sets current page number.
- 54: */
- 56: {
- 59: }
- 63: /**
- 64: * Returns current page number.
- 66: */
- 68: {
- 70: }
- 74: /**
- 75: * Returns first page number.
- 77: */
- 79: {
- 81: }
- 85: /**
- 86: * Returns last page number.
- 88: */
- 90: {
- 92: }
- 96: /**
- 97: * Sets first page (base) number.
- 100: */
- 102: {
- 105: }
- 109: /**
- 110: * Returns first page (base) number.
- 112: */
- 114: {
- 116: }
- 120: /**
- 121: * Returns zero-based page number.
- 123: */
- 125: {
- 127: }
- 131: /**
- 132: * Is the current page the first one?
- 134: */
- 136: {
- 138: }
- 142: /**
- 143: * Is the current page the last one?
- 145: */
- 147: {
- 149: }
- 153: /**
- 154: * Returns the total number of pages.
- 156: */
- 158: {
- 160: }
- 164: /**
- 165: * Sets the number of items to display on a single page.
- 168: */
- 170: {
- 173: }
- 177: /**
- 178: * Returns the number of items to display on a single page.
- 180: */
- 182: {
- 184: }
- 188: /**
- 189: * Sets the total number of items.
- 192: */
- 194: {
- 197: }
- 201: /**
- 202: * Returns the total number of items.
- 204: */
- 206: {
- 208: }
- 212: /**
- 213: * Returns the absolute index of the first item on current page.
- 215: */
- 217: {
- 219: }
- 223: /**
- 224: * Returns the absolute index of the first item on current page in countdown paging.
- 226: */
- 228: {
- 230: }
- 234: /**
- 235: * Returns the number of items on current page.
- 237: */
- 239: {
- 240: return min($this->itemsPerPage, $this->itemCount - $this->getPageIndex() * $this->itemsPerPage);
- 241: }
- 243: }