Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/stopsopa/paginator-test


https://github.com/stopsopa/paginator-test

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/stopsopa/paginator-test.svg?branch=v0.0.9)](https://travis-ci.org/stopsopa/paginator-test)
[![Coverage Status](https://coveralls.io/repos/github/stopsopa/paginator-test/badge.svg?branch=v0.0.9)](https://coveralls.io/github/stopsopa/paginator-test?branch=v0.0.9)
[![Latest Stable Version](https://poser.pugx.org/stopsopa/paginator-test/v/stable)](https://packagist.org/packages/stopsopa/paginator-test)
[![License](https://poser.pugx.org/stopsopa/paginator-test/license)](https://packagist.org/packages/stopsopa/paginator-test)
# DEPRECATED ???
Created in 2022 - quite old now and not maintained. Butt.... Due to it's simplicity I believe it could be still used 🤷

Nothing to be ashamed here:

I used best tools available at a time and delivered what's needed quickly.

# Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Dev notes](#dev-notes)

_(TOC generated using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_

# Installation

composer require stopsopa/paginator-test

# Usage

```php
getPage(3);

var_dump($page->elements());
//array(3) {
// [0] => string(1) "g"
// [1] => string(1) "h"
// [2] => string(1) "i"
//}

var_dump($page->pages());
//array(3) {
// [0] => array(2) {
// 'page' => int(2)
// 'current' => bool(false)
// }
// [1] => array(2) {
// 'page' => int(3)
// 'current' => bool(true)
// }
// [2] => array(2) {
// 'page' => int(4)
// 'current' => bool(false)
// }
//}
```

see more: [test](tests/GeneralTest.php)

# Dev notes

Just follow Makefile... it should be quite self explanatory