From fa00b957378a393f8edbfc98ef111d35d18ecb09 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 24 Sep 2023 13:40:25 +0200 Subject: initial commit --- src/Support/ResourceType.php | 11 +++++++++++ src/Support/RouteLoader.php | 24 ++++++++++++++++++++++++ src/Support/UnitType.php | 11 +++++++++++ 3 files changed, 46 insertions(+) create mode 100644 src/Support/ResourceType.php create mode 100644 src/Support/RouteLoader.php create mode 100644 src/Support/UnitType.php (limited to 'src/Support') diff --git a/src/Support/ResourceType.php b/src/Support/ResourceType.php new file mode 100644 index 0000000..96c0f2c --- /dev/null +++ b/src/Support/ResourceType.php @@ -0,0 +1,11 @@ +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) + ); + } +} diff --git a/src/Support/UnitType.php b/src/Support/UnitType.php new file mode 100644 index 0000000..5a53f24 --- /dev/null +++ b/src/Support/UnitType.php @@ -0,0 +1,11 @@ +