swoole-framwork/core/annotationhandlers/AnnotationHandler.php
2024-05-20 11:51:07 +08:00

15 lines
340 B
PHP

<?php
namespace Core\annotationhandlers;
use Core\annotations\Bean;
use Core\annotations\Value;
return [
Bean::class => function ($instance, $container) {
$arr = explode("\\", get_class($instance));
$beanName = end($arr);
$container->set($beanName, $instance);
},
Value::class => function () {
}
];