From d4dffb8ad10d7e50dd5cd89292a19d3f81fb1c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 3 Aug 2023 11:31:43 +0800 Subject: [PATCH] qqq --- src/Annotate/Controller.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/Annotate/Controller.php diff --git a/src/Annotate/Controller.php b/src/Annotate/Controller.php new file mode 100644 index 0000000..90cba01 --- /dev/null +++ b/src/Annotate/Controller.php @@ -0,0 +1,31 @@ +getReflectionClass($object::class); + foreach ($reflection->getMethods() as $method) { + $attributes = $method->getAttributes(); + foreach ($attributes as $attribute) { + if (!class_exists($attribute->getName())) { + continue; + } + $attribute->newInstance()->dispatch($object, $method->getName()); + } + } + + } + +}