Skip to content

Commit 724791f

Browse files
author
Greg Bowler
committed
simplify default router
1 parent 144d2c0 commit 724791f

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

router.default.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@
1414
use Gt\WebEngine\View\HTMLView;
1515

1616
class DefaultRouter extends BaseRouter {
17-
#[Any(name: "api-route", accept: "application/json,application/xml")]
18-
public function api(Request $request, PathMatcher $pathMatcher):void {
19-
echo "API ROUTE CALLBACK", PHP_EOL;
20-
foreach($pathMatcher->findForUriPath(
21-
$request->getUri()->getPath(),
22-
"api/v1",
23-
"php"
24-
) as $logicName => $path) {
25-
$this->addToLogicAssembly($path);
26-
}
27-
}
28-
2917
#[Any(name: "page-route", accept: "text/html,application/xhtml+xml,*/*")]
3018
public function page(
3119
Request $request
@@ -144,11 +132,4 @@ public function page(
144132
$this->addToViewAssembly($path);
145133
}
146134
}
147-
148-
#[Post(path: "/greet/@name", function: "greet", accept: "text/plain")]
149-
public function dynamicText(
150-
DynamicPath $dynamicPath
151-
):void {
152-
$this->addToLogicAssembly("class/Output/Greeter.php");
153-
}
154135
}

0 commit comments

Comments
 (0)