2017 © Pedro Peláez
 

library paginator

Generates pagination HTML.

image

starlit/paginator

Generates pagination HTML.

  • Saturday, February 18, 2017
  • by jandreasn
  • Repository
  • 3 Watchers
  • 1 Stars
  • 16,754 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

Paginator

Build Status Code Coverage, (*1)

Generates pagination HTML., (*2)

Installation

Add the package as a requirement to your composer.json:, (*3)

$ composer require starlit/paginator

Usage

<?php

use Starlit\Paginator;

$currentPageNo = 1;
$rowsPerPage = 10;
$totalRowCount = 20;

$paginator = new Paginator(
    $currentPageNo,
    $rowsPerPage,
    $totalRowCount,
    function ($page) {
        return 'index.php?page=' . $page;
    }
);

echo $paginator->getHtml();

Produces:, (*4)

<div class="pagination multiple-pages">
    <ul>
        <li class="previous disabled"><span>&laquo;</span></li>
        <li class="active"><a href="index.php?page=1">1</a></li>
        <li><a href="index.php?page=2">2</a></li>
        <li class="next"><a href="index.php?page=2">&raquo;</a></li>
    </ul>
</div>

Requirements

  • Requires PHP 7.1 or above.

License

This software is licensed under the BSD 3-Clause License - see the LICENSE file for details., (*5)

The Versions

18/02 2017

dev-master

9999999-dev http://github.com/starweb/starlit-paginator

Generates pagination HTML.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Starweb AB

pagination paginator

18/02 2017

0.1.1

0.1.1.0 http://github.com/starweb/starlit-paginator

Generates pagination HTML.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Starweb AB

pagination paginator

31/03 2016

0.1.0

0.1.0.0 http://github.com/starweb/starlit-paginator

Generates pagination HTML.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Starweb / Ehandelslogik i Lund AB

pagination paginator