Pagination

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Pagination Component.

Example

<?php

use miBadger\Pagination\Pagination;

/**
 * Create a new pagination object with 10 items and 3 items per page.
 */
$pagination = new Pagination([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3);

/**
 * Returns the items on page 0.
 */
$pagination->get(0); // [1, 2, 3]

/**
 * Returns the items on page 1.
 */
$pagination->get(1); // [4, 5, 6]