From b1c06b848324b06012bde45d314ac294d64b5f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 18:17:43 +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/Server.php | 4 ++-- System/Application.php | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index 49dff73f..95ef2d99 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -470,7 +470,7 @@ class Server extends HttpService $handler = $alias['handler']; foreach ($alias['attributes'] as $key => $attribute) { if ($attribute instanceof IAnnotation) { - $attribute->setHandler($handler); + $attribute->execute($handler); } } } @@ -496,7 +496,7 @@ class Server extends HttpService $handler = $alias['handler']; foreach ($alias['attributes'] as $key => $attribute) { if ($attribute instanceof IAnnotation) { - $attribute->setHandler($handler); + $attribute->execute($handler); } } } diff --git a/System/Application.php b/System/Application.php index 17ce108e..6aadcb7a 100644 --- a/System/Application.php +++ b/System/Application.php @@ -134,13 +134,13 @@ class Application extends BaseApplication public function scan_system_annotation() { $annotation = Snowflake::app()->getAttributes(); - $annotation->readControllers(__DIR__ . '/../Console', 'Console', 'system'); - $annotation->readControllers(__DIR__ . '/../Database', 'Database', 'system'); - $annotation->readControllers(__DIR__ . '/../Gii', 'Gii', 'system'); - $annotation->readControllers(__DIR__ . '/../HttpServer', 'HttpServer', 'system'); - $annotation->readControllers(__DIR__ . '/../Kafka', 'Kafka', 'system'); - $annotation->readControllers(__DIR__ . '/../System', 'Snowflake', 'system'); - $annotation->readControllers(__DIR__ . '/../Validator', 'Validator', 'system'); + $annotation->readControllers(__DIR__ . '/../Console/', 'Console', 'system'); + $annotation->readControllers(__DIR__ . '/../Database/', 'Database', 'system'); + $annotation->readControllers(__DIR__ . '/../Gii/', 'Gii', 'system'); + $annotation->readControllers(__DIR__ . '/../HttpServer/', 'HttpServer', 'system'); + $annotation->readControllers(__DIR__ . '/../Kafka/', 'Kafka', 'system'); + $annotation->readControllers(__DIR__ . '/../System/', 'Snowflake', 'system'); + $annotation->readControllers(__DIR__ . '/../Validator/', 'Validator', 'system'); }