Skip to content

FyreIterator is a free, open-source iteration library for PHP.

License

Notifications You must be signed in to change notification settings

elusivecodes/FyreIterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FyreIterator

FyreIterator is a free, open-source iteration library for PHP.

Table Of Contents

Installation

Using Composer

composer require fyre/iterator

In PHP:

use Fyre\Utility\Iterator;

Methods

Add

Add a test

  • $name is a string representing the test name.
  • $callback is the callback to execute.
Iterator::add($name, $callback);

All

Get all tests.

$tests = Iterator::all();

Clear

Clear all tests.

Iterator::clear();

Count

Get the number of tests.

$testCount = Iterator::count();

Get

Get a specific test callback.

  • $name is a string representing the test name.
$test = Iterator::get($name);

Has

Determine whether a test exists.

  • $name is a string representing the test name.
$hasTest = Iterator::has($name);

Remove

Remove a test.

  • $name is a string representing the test name.
$removed = Iterator::remove($name);

Run

Run the tests and return the results.

  • $iterations is a number representing the number of iterations to run, and will default to 1000.
$results = Iterator::run($iterations);

About

FyreIterator is a free, open-source iteration library for PHP.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages