yalayolooo / pagerpro
A library to split results into multiple pages
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yalayolooo/pagerpro
Requires
- php: >=7.4
This package is not auto-updated.
Last update: 2025-12-03 23:56:04 UTC
README
A library to split results into miltiple pages
Install
Via Composer
$ composer require yalayolooo/pagerpro
Usage
$obj = new ISPagerPro\DirPage( new ISPagerPro\PagesList(), 'photos', 3, 2 ); echo "<pre>"; print_r($obj->getItems()); echo "</pre>"; echo "<p>$obj</p>";
$obj = new ISPagerPro\FilePager( new ISPagerPro\ItemsRange(), 'largertextfile.txt' ); echo "<pre>"; echo "<p>$obj</p>";
try { $pdo = new PDO( 'mysql:host=localhost;dbname=test', 'root', '', [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION] ); $obj = new ISPagerPro\PdoPage( new ISPagerPro\ItemsRange(), $pdo, 'table_name' ); echo "<pre>"; print_r($obj->getItems()); echo "</pre>"; echo "<p>$obj</p>"; } catch (PDOException $e){ echo "Can't connect to database"; }
License
The MIT License (MIT). Please see [License File] (https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information.