From f76fd8d8794897a1d8c7ee4c40663820addd1242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 17:47:21 +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/Annotation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index fc43e3d5..21fc4141 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -170,7 +170,9 @@ class Annotation extends Component /** @var IAnnotation $annotation */ $annotation = $attribute->newInstance()->execute([$object, $value->getName()]); if ($value->isStatic()) { - $object::{$value->getName()} = $annotation; + $name = $value->getName(); + + $object::$name = $annotation; } else if ($value->isPublic()) { $object->{$value->getName()} = $annotation; } else {