2017 © Pedro Peláez
 

library spiral-array-paginable

Wrapper to allow paginate arrays.

image

vvval/spiral-array-paginable

Wrapper to allow paginate arrays.

  • Tuesday, April 11, 2017
  • by vvval
  • Repository
  • 1 Watchers
  • 0 Stars
  • 221 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

spiral-array-paginable

Small helper, that grants ability to paginate arrays in RecordSource way. Created for Spiral Framework, (*1)

Latest Stable Version Total Downloads Scrutinizer Code Quality Coverage Status Build Status, (*2)

Usage

//Example input data
$data = [
    'one'   => 10,
    'two'   => 20,
    'three' => 30,
    'four'  => 40,
    'five'  => 50,
    'six'   => 60,
    'seven' => 70,
    'eight' => 80,
    'nine'  => 90,
    'ten'   => 100,
];

$paginable = new PaginableArray($data);
$paginable->paginate(5);

//Implements `\Iterator` so you can just use it in foreach cycle
foreach ($paginable as $value) {
    echo $value; // 10, 20, 30, 40, 50 for first page
}

//Also preserves keys. To access them during foreach cycle use `iterate()` method
foreach ($paginable->iterate() as $key => $value) {
    echo $key; // one, two, three, four, five for first page
}

The Versions

11/04 2017

dev-master

9999999-dev

Wrapper to allow paginate arrays.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Valentin V / vvval

11/04 2017

v0.1.2

0.1.2.0

Wrapper to allow paginate arrays.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Valentin V / vvval

11/04 2017

v0.1.1

0.1.1.0

Vault component dedicated to store internal system statistics.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Valentin V / vvval

13/03 2017

v0.1.0

0.1.0.0

Vault component dedicated to store internal system statistics.

  Sources   Download

The Requires

 

The Development Requires

by Valentin V / vvval