swoole-framwork/core/annotationhandlers/AnnotationHandler.php

15 lines
340 B
PHP
Raw Normal View History

2024-05-20 11:51:07 +08:00
<?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 () {
}
];