2017 © Pedro Peláez
 

library iterators

Several iterators

image

jlaso/iterators

Several iterators

  • Sunday, October 2, 2016
  • by jlaso
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

iterators

installation

composer require jlaso/itearators

variable-iterator

simplifies the use of a complex array to iterate over all the possibilities, (*1)

how to use

use JLaso\Iterators\VariableIterator;

$iterator = new VariableIterator([
    'genre' => ['W', 'M', '?'],
    'ages' => ['18-25', '26-58', '+59'],
    'profession' => ['engineer', 'services', 'others'],
    'holidays' => ['none', '1-10', '+10'],
]);

foreach ($iterator as $item) {
    // you have in every $item the current mix of variations
}

unit testing

vendor/bin/phpunit

The Versions

02/10 2016

dev-master

9999999-dev https://github.com/jlaso/iterators

Several iterators

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

iterator variable iterable