Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rancoud/pagination

Pagination package
https://github.com/rancoud/pagination

a11y aria aria-label composer coverage html packagist pagination php php74 php8 php80 php81 phpunit phpunit9

Last synced: 3 days ago
JSON representation

Pagination package

Awesome Lists containing this project

README

        

# Pagination Package

![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/rancoud/pagination)
[![Packagist Version](https://img.shields.io/packagist/v/rancoud/pagination)](https://packagist.org/packages/rancoud/pagination)
[![Packagist Downloads](https://img.shields.io/packagist/dt/rancoud/pagination)](https://packagist.org/packages/rancoud/pagination)
[![Composer dependencies](https://img.shields.io/badge/dependencies-1-brightgreen)](https://github.com/rancoud/Pagination/blob/master/composer.json)
[![Test workflow](https://img.shields.io/github/actions/workflow/status/rancoud/pagination/test.yml?branch=master)](https://github.com/rancoud/pagination/actions/workflows/test.yml)
[![Codecov](https://img.shields.io/codecov/c/github/rancoud/pagination?logo=codecov)](https://codecov.io/gh/rancoud/pagination)

Generate HTML pagination for accessibility.

## Dependencies
Security package: [https://github.com/rancoud/Security](https://github.com/rancoud/Security)

## Installation
```php
composer require rancoud/pagination
```

## How to use it?
```php
$currentPage = 1;
$countElements = 10;
$countElementPerPage = 5;

$p = new Pagination();
$html = $p->generateHtml($currentPage, $countElements, $countElementPerPage);
echo $html;
```
It will output
```html

```
## Lexicon
* **Root** represents `