rubicon/loop
最新稳定版本:0.1.0
Composer 安装命令:
composer require rubicon/loop
包简介
Event supported Loop library
README 文档
README
Event Supported Loop
Usage Example:
namespace Rubicon\Loop;
(new Loop([
'interval' => 100,
'repeat' => 26,
]))
->attach(LoopEvent::EVENT_LOOP_START, function() {
echo 'start...' . PHP_EOL;
})
->attach(LoopEvent::EVENT_EXECUTE_POST, function(LoopEvent $event) {
echo $event->getResult() . PHP_EOL;
})
->attach(LoopEvent::EVENT_LOOP_STOP, function(LoopEvent $event) {
echo $event->getException()->getMessage() . PHP_EOL;
})
->invoke(function(LoopEvent $event) {
$result = $event->getResult();
return $result ? ++$result : 'A';
})
;
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-10-05