From da71345f1e6035cccdaca15606a2208e4ba0dadf Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 20 Sep 2021 01:24:32 +0800 Subject: [PATCH] 111 --- core/Di/NoteManager.php | 7 +++++-- core/Proxy/AspectProxy.php | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/Di/NoteManager.php b/core/Di/NoteManager.php index cf38f448..6ca2a265 100644 --- a/core/Di/NoteManager.php +++ b/core/Di/NoteManager.php @@ -214,8 +214,11 @@ class NoteManager public static function getSpecify_annotation(string $attribute, string $class, string $method = null): mixed { $class = self::getAttributeTrees($attribute, $class); - if (empty($class) || !isset($class['method']) || empty($method)) { - return $class['method'] ?? []; + if (empty($class) || !isset($class['method'])){ + return null; + } + if (empty($method)) { + return $class['method']; } foreach ($class['method'] as $value) { $key = key($value); diff --git a/core/Proxy/AspectProxy.php b/core/Proxy/AspectProxy.php index 596bf908..7cb1a903 100644 --- a/core/Proxy/AspectProxy.php +++ b/core/Proxy/AspectProxy.php @@ -46,6 +46,7 @@ class AspectProxy extends AProxy implements ProxyInterface { $aspect = NoteManager::getSpecify_annotation(Aspect::class, $executor[0], $executor[1]); if (!is_null($aspect)) { + var_dump($aspect); $aspect = Kiri::getDi()->get($aspect->aspect); } return $aspect;