modify mysql result

This commit is contained in:
2022-04-10 03:37:58 +08:00
parent 8037bfa1b9
commit f091fd5ba0
3 changed files with 295 additions and 93 deletions
+14 -13
View File
@@ -39,13 +39,16 @@ class Server extends HttpService
private mixed $daemon = 0;
/**
* @param State $state
* @param ServerManager $manager
* @param ContainerInterface $container
* @param array $config
* @throws Exception
*/
/**
* @param State $state
* @param ServerManager $manager
* @param ContainerInterface $container
* @param ProcessManager $processManager
* @param EventDispatch $eventDispatch
* @param Router $router
* @param array $config
* @throws Exception
*/
public function __construct(public State $state,
public ServerManager $manager,
public ContainerInterface $container,
@@ -97,8 +100,7 @@ class Server extends HttpService
* @throws ConfigException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ReflectionException
* @throws Exception
* @throws Exception
*/
public function start(): void
{
@@ -109,14 +111,14 @@ class Server extends HttpService
$this->manager->addListener($rpcService['type'], $rpcService['host'], $rpcService['port'], $rpcService['mode'], $rpcService);
}
$this->process[] = Inotify::class;
$processes = array_merge($this->process, Config::get('processes', []));
$this->processManager->batch($processes);
$this->eventDispatch->dispatch(new OnServerBeforeStart());
$this->router->scan_build_route();
$this->manager->start();
}
@@ -126,8 +128,7 @@ class Server extends HttpService
* @throws ConfigException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ReflectionException
* @throws Exception
* @throws Exception
*/
public function shutdown()
{