modify plugin name
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user