This commit is contained in:
2023-04-16 02:28:58 +08:00
parent e0159c836a
commit 4e390e89d6
+5 -1
View File
@@ -40,6 +40,10 @@ class AsyncServer implements ServerInterface
#[Container(Config::class)]
public Config $config;
/**
* @var Kiri\Di\Container
*/
#[Container(ContainerInterface::class)]
public ContainerInterface $container;
@@ -129,7 +133,7 @@ class AsyncServer implements ServerInterface
$this->onEventListen($this->server, Config::get('server.events', []));
$this->onEventListen($this->server, $config->events);
$this->container->setBindings(ServerInterface::class, $this->server);
$this->container->set(ServerInterface::class, $this->server);
}