modify plugin name

This commit is contained in:
2022-06-16 17:38:22 +08:00
parent 0233acb279
commit 0051f1f15c
25 changed files with 928 additions and 1055 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace Kiri\Server\Abstracts;
use Kiri\Context;
class DoWhile
{
private bool $isStop = false;
/**
* @param array|\Closure $handler
* @return void
*/
public static function waite(array|\Closure $handler): void
{
if (Context::hasContext('stop')) {
return;
}
$handler();
self::waite($handler);
}
/**
* @return void
*/
public static function stop(): void
{
Context::setContext('stop', 1);
}
}