This commit is contained in:
2021-08-05 17:11:41 +08:00
parent e6da017bc1
commit ba7156770e
2 changed files with 8 additions and 10 deletions
+5 -10
View File
@@ -4,15 +4,6 @@
namespace Annotation;
use Annotation\Route\After;
use Annotation\Route\Interceptor;
use Annotation\Route\Limits;
use Annotation\Route\Middleware as RMiddleware;
use HttpServer\Route\Node;
use ReflectionException;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
/**
* Class Attribute
@@ -22,7 +13,11 @@ abstract class Attribute implements IAnnotation
{
/**
* @param mixed $class
* @param mixed|string $method
* @return mixed
*/
public function execute(mixed $class, mixed $method = ''): mixed
{
// TODO: Implement execute() method.
+3
View File
@@ -71,6 +71,9 @@ class OnServerWorker extends \Server\Abstracts\Server
$di = Snowflake::getDi();
foreach ($fileLists as $class) {
$instance = $di->get($class);
foreach ($di->getTargetNote($class) as $value) {
$value->execute($instance);
}
$methods = $di->getMethodAttribute($class);
foreach ($methods as $method => $attribute) {
if (empty($attribute)) {