- Some work done on entity generation

This commit is contained in:
Dave Mc Nicoll committed 2026-05-21 14:58:21 +00:00
1 parent 05975089e5
commit 2dc71cd350
12 files changed
+94 -28

No files matched your search

+4 -3
View File
@@ -35,19 +35,20 @@ class RouteDescriptor
$attribute = $reflector->reflectClass()->getAttribute(\Notes\Route\Attribute\Object\Route::class);
$base = $attribute ? $attribute->object->base : "";
$base = $attribute ? $attribute->object->getBase() : "";
foreach($reflector->reflectMethods() as $method) {
foreach(array_reverse($method->getAttributes(Route::class)) as $routeAttribute) {
$itemBase = $routeAttribute->object->getBase() ?? $base;
$route = $routeAttribute->object;
$path = rtrim($route->route, '/');
$cleaned = $this->cleanRouteFromRegex($base.$path);
$cleaned = $this->cleanRouteFromRegex($itemBase.$path);
$url = $this->urlExtension->buildUrl($cleaned);
$routes[] = [
'name' => $route->name,
'route' => $url,
'path' => $base.$path,
'path' => $itemBase.$path,
'cleaned' => $cleaned,
'description'=> $route->description,
#'methods' =>implode(', ', (array)$route->method),