From ec101543c9923f02413d0f6137790d7c899ca1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 29 Mar 2021 17:37:30 +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 --- Annotation/Loader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 4f2a5b27..5910f60d 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -185,7 +185,11 @@ class Loader extends BaseObject if (!class_exists($attribute->getName())) { continue; } - $_property[] = $attribute->newInstance(); + $property = $attribute->newInstance(); + if ($property instanceof Inject) { + $property->execute([$_array['handler'], $method]); + } + $_property[] = $property; } $_array['property'][$method->getName()] = $_property; }