From b21316248572cb27ed1f504529ad6680a473022e Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 2 Jan 2024 20:42:01 +0100 Subject: gemini --- src/http/Support/RouteLoader.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/http/Support/RouteLoader.php (limited to 'src/http/Support') diff --git a/src/http/Support/RouteLoader.php b/src/http/Support/RouteLoader.php new file mode 100644 index 0000000..b0e74cb --- /dev/null +++ b/src/http/Support/RouteLoader.php @@ -0,0 +1,24 @@ +setDefault('_', compact('class', 'method', 'annotation')); + } + + protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) + { + $name = parent::getDefaultRouteName($class, $method); + + return str_replace( + '_', + '.', + str_replace('app_controller_', '', $name) + ); + } +} -- cgit v1.2.3