From 1f8ef9663a58c5237216c3f24929a37358f831e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 18 Sep 2020 19:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnHandshake.php | 3 ++- System/Annotation/Annotation.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HttpServer/Events/OnHandshake.php b/HttpServer/Events/OnHandshake.php index d6c2b7c6..c25c3b74 100644 --- a/HttpServer/Events/OnHandshake.php +++ b/HttpServer/Events/OnHandshake.php @@ -53,7 +53,8 @@ class OnHandshake extends Callback } /** @var AWebsocket $manager */ - $manager = Snowflake::app()->annotation->get('websocket'); + $manager = Snowflake::app()->getAnnotation()->get('websocket'); + var_dump($manager); if ($manager->has($manager->getName(AWebsocket::HANDSHAKE))) { $manager->runWith($manager->getName(AWebsocket::HANDSHAKE), [$request, $response]); } else { diff --git a/System/Annotation/Annotation.php b/System/Annotation/Annotation.php index 1a613e20..20b6f57d 100644 --- a/System/Annotation/Annotation.php +++ b/System/Annotation/Annotation.php @@ -152,7 +152,7 @@ class Annotation extends BaseAnnotation * @param $className * @throws ReflectionException */ - protected function scanning($path, $namespace, $className) + protected function scanning(string $path, $namespace, $className) { $di = Snowflake::getDi(); foreach (glob($path . '/*') as $file) {