diff --git a/Annotation/Attribute.php b/Annotation/Attribute.php index 067281bc..3948f36c 100644 --- a/Annotation/Attribute.php +++ b/Annotation/Attribute.php @@ -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. diff --git a/Server/Worker/OnServerWorker.php b/Server/Worker/OnServerWorker.php index 7ef9a14c..3e28e9ac 100644 --- a/Server/Worker/OnServerWorker.php +++ b/Server/Worker/OnServerWorker.php @@ -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)) {