2017 © Pedro Peláez
 

library pagination

A small pagination library that produces data objects instead of HTML.

image

laasti/pagination

A small pagination library that produces data objects instead of HTML.

  • Friday, January 15, 2016
  • by nebulousGirl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 187 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Laasti/pagination

A small library to generate pagination., (*1)

Installation

composer require laasti/pagination

Usage


$pagination = new Pagination($currentPage, $total, $perPage, $baseUrl, $neighbours); echo '<a href="'.$pagination->first()->link().'">First</a>'; echo '<a href="'.$pagination->previous()->link().'">Previous</a>'; foreach ($pagination as $page) { if ($page->isActive()) { echo '<b>'.$page->number().'</b>'; } else { echo '<a href="'.$page->link().'">'.$page->number().'</a>'; } } echo '<a href="'.$pagination->next()->link().'">Next</a>'; echo '<a href="'.$pagination->last()->link().'">Last</a>';

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

See CHANGELOG.md for more information., (*2)

Credits

Author: Sonia Marquette (@nebulousGirl), (*3)

License

Released under the MIT License. See LICENSE.txt file., (*4)

The Versions

15/01 2016

dev-master

9999999-dev

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

15/01 2016

v0.1

0.1.0.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

15/01 2016

v0.2.2

0.2.2.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

11/01 2016

v0.2.1

0.2.1.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

03/11 2015

v0.2

0.2.0.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

14/09 2015

v0.1.2

0.1.2.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

31/08 2015

v0.1.1

0.1.1.0

A small pagination library that produces data objects instead of HTML.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires