first commit

This commit is contained in:
2021-11-03 15:17:52 +08:00
commit 000d084abf
48 changed files with 2317 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace Server\Handler;
use Annotation\Inject;
use Kiri\Events\EventDispatch;
use Server\Events\OnAfterReload;
use Server\Events\OnBeforeReload;
use Swoole\Server;
/**
*
*/
class OnServerReload
{
/**
* @var EventDispatch
*/
#[Inject(EventDispatch::class)]
public EventDispatch $eventDispatch;
/**
* @param Server $server
*/
public function onBeforeReload(Server $server)
{
$this->eventDispatch->dispatch(new OnBeforeReload($server));
}
/**
* @param Server $server
*/
public function onAfterReload(Server $server)
{
$this->eventDispatch->dispatch(new OnAfterReload($server));
}
}