2017 © Pedro Peláez
 

library pagination

Simple pagination

image

amstaffix/pagination

Simple pagination

  • Tuesday, January 26, 2016
  • by AmsTaFFix
  • Repository
  • 4 Watchers
  • 41 Stars
  • 60,983 Installations
  • PHP
  • 7 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 6 Versions
  • 14 % 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

26/01 2016

dev-master

9999999-dev

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Nikita Sapogov
by Kilte Leichnam

pagination

26/01 2016

1.1.3

1.1.3.0

Simple pagination

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Nikita Sapogov
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