This commit is contained in:
2023-08-11 02:18:04 +08:00
parent 8fb3fd699e
commit 65fa64e6b7
3 changed files with 21 additions and 13 deletions
+10
View File
@@ -5,7 +5,9 @@ namespace Kiri\Server;
use Exception;
use Kiri\Di\Context;
use Kiri\Router\Router;
use Kiri\Server\Abstracts\BaseProcess;
use Kiri\Server\Events\OnWorkerStart;
use ReflectionException;
use Swoole\Coroutine;
use Swoole\Event;
@@ -31,6 +33,14 @@ class HotReload extends BaseProcess
protected mixed $inotify = null;
/**
* @param Router $router
*/
public function __construct(public Router $router)
{
on(OnWorkerStart::class, [$this->router, 'scan_build_route']);
}
/**
* @return string
*/