diff --git a/http-helper/Route/Node.php b/http-helper/Route/Node.php index 79212708..069042f9 100644 --- a/http-helper/Route/Node.php +++ b/http-helper/Route/Node.php @@ -234,8 +234,12 @@ class Node { [$controller, $action] = $handler; + if (is_object($controller)) { + $controller = get_class($controller); + } + /** @var Aspect $aspect */ - $aspect = Kiri::getDi()->getMethodByAnnotation(Aspect::class, $controller::class, $action); + $aspect = Kiri::getDi()->getMethodByAnnotation(Aspect::class, $controller, $action); if (empty($aspect)) { return null; }