This commit is contained in:
as2252258@163.com
2021-08-29 04:06:49 +08:00
parent 9da50baed0
commit 133ca2c273
21 changed files with 356 additions and 495 deletions
-20
View File
@@ -52,26 +52,6 @@ class Kiri
private static ?Application $service = null;
/**
* @param object $class
* @throws ReflectionException
*/
public static function injectProperty(object $class)
{
$attributes = static::getDi()->getClassReflectionProperty($class::class);
/**
* @var string $property
* @var ReflectionProperty $attribute
*/
foreach ($attributes as $property => $attribute) {
foreach ($attribute->getAttributes() as $item) {
$item->newInstance()->execute($class, $property);
}
}
}
/**
* @param $service
*