PHP Classes

Peter PHP Pagination Class: Generate HTML to navigate between listing pages

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-04-08 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 69 All time: 10,041 This week: 213Up
Version License PHP version Categories
peter-pagination 1.0GNU General Publi...5HTML, PHP 5
Description Author

This package can generate HTML to navigate between listing pages.

It takes as parameter values the type of navigation to generate and the total number of entries in the listing.

The class generates HTML with links to allow the user to click and go to the other listing pages considering the current listing page number.

The class's navigation can be either a list of links or just a group of links pointing to each listing page.

Developers can configure the presentation of the navigation using CSS styles.

Picture of Ujah Chigozie peter
  Performance   Level  
Name: Ujah Chigozie peter <contact>
Classes: 16 packages by
Country: Nigeria Nigeria
Age: 31
All time rank: 249013 in Nigeria Nigeria
Week rank: 16 Up1 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 7x

Details

PHP Pagination

Pagination is a simple pagging in php

Installation

Installation is super-easy via Composer:

composer require peterujah/pagination

USAGES

Hierarchical can be use as an array, html or google organizations chart

 use Peterujah\NanoBlock\Pagination;
 $paging = new Pagination($rowCount, Pagination::LIST);
 $paging = new Pagination($rowCount, Pagination::LINK);

Dump array

 $paging = new Pagination(100, Pagination::LIST);
 $paging->setLimit(20);
 $paging->setCurrentPage($_GET["page"]??1)->show();

 $paging = new Pagination(100, Pagination::LIST);
 $paging->setLimit(20);
 $html = $paging->setCurrentPage($_GET["page"]??1)->get();

Use built in css style, only work with $paging->show() method

$paging->setAllowCss(true);

Initalisation options new Pagination($rowCount, Pagination::LINK)

| Options | Description | |-----------------|-------------------------------------------------------------------------------------| | LIST | Retrieve result as an html list | | LINK | Retrieve result in HTML link |

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Pagination.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file PaginationTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:69
This week:0
All time:10,041
This week:213Up
For more information send a message to info at phpclasses dot org.