First commit

This commit is contained in:
2025-10-02 10:33:06 +08:00
parent 198b8bf2a6
commit c38eed4a22
5512 changed files with 958855 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace think\swoole\resetters;
use think\Container;
use think\swoole\Sandbox;
use think\swoole\contract\ResetterInterface;
/**
* Class ResetEvent
* @package think\swoole\resetters
* @property Container $app;
*/
class ResetEvent implements ResetterInterface
{
public function handle(Container $app, Sandbox $sandbox)
{
$event = clone $sandbox->getEvent();
$closure = function () use ($app) {
$this->app = $app;
};
$resetEvent = $closure->bindTo($event, $event);
$resetEvent();
$app->instance('event', $event);
return $app;
}
}