From d6550a2217cedc36448ed3c8a2b26d8d28ee35ac Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 3 Apr 2021 01:30:31 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 0894dbd3..9adef56a 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; }