From d3e5531189de8298967d7cb7ff682744e31ddf68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 31 Aug 2020 23:32:25 +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 --- system/Annotation/Annotation.php | 4 ++-- system/Annotation/Definition/Http.php | 11 +++++++++++ system/Annotation/Definition/Websocket.php | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/system/Annotation/Annotation.php b/system/Annotation/Annotation.php index 43190520..88b7dd99 100644 --- a/system/Annotation/Annotation.php +++ b/system/Annotation/Annotation.php @@ -134,7 +134,7 @@ class Annotation extends BaseAnnotation */ public function isLegitimate($events) { - throw new Exception('Undefined analytic function.'); + throw new Exception('Undefined analytic function isLegitimate.'); } @@ -145,7 +145,7 @@ class Annotation extends BaseAnnotation */ public function getName($function, $events) { - throw new Exception('Undefined analytic function.'); + throw new Exception('Undefined analytic function getName.'); } diff --git a/system/Annotation/Definition/Http.php b/system/Annotation/Definition/Http.php index 33eafa8f..992a1463 100644 --- a/system/Annotation/Definition/Http.php +++ b/system/Annotation/Definition/Http.php @@ -55,4 +55,15 @@ class Http extends Annotation } + /** + * @param $controller + * @param $methodName + * @param $events + * @return array|void + */ + public function createHandler($controller, $methodName, $events) + { + return [$controller, $methodName]; + } + } diff --git a/system/Annotation/Definition/Websocket.php b/system/Annotation/Definition/Websocket.php index e75a2cc3..940ba203 100644 --- a/system/Annotation/Definition/Websocket.php +++ b/system/Annotation/Definition/Websocket.php @@ -36,6 +36,10 @@ class Websocket extends Annotation } + /** + * @param $events + * @return bool|void + */ public function isLegitimate($events) { return true;