Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 20577 программистов и 978 роботов. Сейчас ищут 690 программистов ...

Pager::getPageRangeByPageId

Вернуться к: Pager

Pager::getPageRangeByPageId

Pager::getPageRangeByPageId() – Returns offsets for given pageID.

Synopsis

require_once 'Pager.php';

array Pager::getPageRangeByPageId ( integer $pageid = null )

Given a PageId, it returns the limits of the range of pages displayed. While getOffsetByPageId() returns the offset of the data within the current page, this method returns the offsets of the page numbers interval.

E.g., in "Jumping" mode, if you have pageId=3 and delta=10, it will return (1, 10). pageID=8 would give you (1, 10) as well, because 1 <= 8 <= 10. pageID=11 would give you (11, 20).

In "Sliding" mode, if you have pageId=5 and delta=2, it will return (3, 7). pageID of 9 would give you (4, 8).

if the method is called without parameter, pageID is set to currentPage number

Parameter

  • integer $pageid - PageID to get offsets for

Return value

return array with first and last offsets



Вернуться к: Pager

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware