fyre/iterator
Composer 安装命令:
composer require fyre/iterator
包简介
An iterator library.
README 文档
README
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;
Basic Usage
$iterator = new Iterator();
Methods
Add
Add a test
$nameis a string representing the test name.$callbackis 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.
$count = $iterator->count();
Get
Get a specific test callback.
$nameis a string representing the test name.
$test = $iterator->get($name);
Has
Determine whether a test exists.
$nameis a string representing the test name.
$hasTest = $iterator->has($name);
Remove
Remove a test.
$nameis a string representing the test name.
$iterator->remove($name);
Run
Run the tests and return the results.
$iterationsis a number representing the number of iterations to run, and will default to 1000.
$results = $iterator->run($iterations);
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-09