PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of Andre Roque Filipe  >  MASNathan\Pagination  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: MASNathan\Pagination
Get pagination links for listings split in pages
Author: By
Last change:
Date: 4 years ago
Size: 2,148 bytes
 

Contents

Class file image Download

Pagination

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads Support via Gittip

Lightweight and easy to use pagination library

Install

Via Composer

$ composer require masnathan/pagination

Usage

use MASNathan\Pagination\Pagination;

$pager = new Pagination($totalPages, $boundaries, $around, $currentPage);

foreach ($pager->getPages() as $pageLabel) {
    echo sprintf('<a href="/list/page/%s">%s</a>', $pageLabel, $pageLabel);
}

You can also check the `MASNathan\Pagination\Html\Pagination` for a html builder, it's possible to extend it as well, check the Bootstrap class.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email andre.r.flip@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.