This commit is contained in:
2021-02-22 17:47:21 +08:00
parent 81a27b615a
commit f76fd8d879
+3 -1
View File
@@ -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 {