From 4e390e89d693797981da897489baf6d4ed20fe5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 16 Apr 2023 02:28:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Abstracts/AsyncServer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Abstracts/AsyncServer.php b/Abstracts/AsyncServer.php index ab724fb..8d722a5 100644 --- a/Abstracts/AsyncServer.php +++ b/Abstracts/AsyncServer.php @@ -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); }