avn/paginator

There is no license information available for the latest version (0.1.0) of this package.

Paginator

Installs: 188

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/avn/paginator

0.1.0 2022-10-16 20:23 UTC

This package is auto-updated.

Last update: 2025-10-17 11:44:13 UTC


README

How to use

$idList = $someRepository->getIdList(); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

$pagination = new Paginator(
    (new PaginatorRequest($idList))
        ->setCurrentPage(3)
        ->setLimit(2)
)

$totalPageCount = $pagination->getTotalPageCount(); // 5
$resultIdList = $pagination->getIdList(); // [5, 6]