grifix/repeater
Composer 安装命令:
composer require grifix/repeater
包简介
Repeats code until it returns null
README 文档
README
composer require grifix/repeater
Usage
This code tries to get value from external service 10 times or until external service will return value that is not null:
Repeater::repeatUntilNotNull(function () use ($externalService): ?string {
$result = $externalService->getValue();
if(null === $result){
sleep(1);
}
return $result;
}, 10);
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-05