2017 © Pedro Peláez
 

library pagination

Simple pagination

image

kilte/pagination

Simple pagination

  • Tuesday, December 15, 2015
  • by AmsTaFFix
  • Repository
  • 2 Watchers
  • 27 Stars
  • 54,727 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Pagination

The simple pagination, (*1)

Downloads License, (*2)

Requirements

  • PHP >= 5.3.3

Usage

use Kilte\Pagination\Pagination;
$pagination = new Pagination($totalItems, $currentPage, $itemsPerPage, $neighbours);
$offset = $pagination->offset();
$limit = $pagination->limit();
$listing = $someInstance->listing($offset, $limit);
$pages = $pagination->build(); // Contains associative array with a numbers of a pages
// For example:
/*
    array(
        1 => 'first',
        5 => 'less',
        6 => 'previous', // This interval
        7 => 'previous', // is defined
        8 => 'previous', // by
        9 => 'previous', // $neighbours argument
        10 => 'current', // Current page
        11 => 'next',
        12 => 'next',
        13 => 'next',
        14 => 'next',
        15 => 'more',
        20 => 'last'
    )
*/

Note: Tags (like first, current, ...) are defined as constants in the Pagination class (TAG_FIRST, TAG_CURRENT, ...)., (*3)

Tests

$ composer install
$ vendor/bin/phpunit

Contributing

Contribution process, (*4)

CHANGELOG

Changelog, (*5)

LICENSE

The MIT License (MIT), (*6)

The Versions

15/12 2015

dev-master

9999999-dev

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Kilte Leichnam

pagination

27/12 2014

1.1.2

1.1.2.0

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Kilte Leichnam

pagination

31/08 2014

1.1.1

1.1.1.0

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Kilte Leichnam

pagination

16/06 2014

1.1.0

1.1.0.0

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Kilte Leichnam

pagination

25/02 2014

1.0.0

1.0.0.0

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Kilte Leichnam

pagination