templating = $templating; $this->router = new HttpRouter(errorHandler: new RoutingErrorHandler($templating)); $this->router->use('/', fn($resp) => $resp->setPoweredBy('Hanyuu')); } public function getRouter(): IRouter { return $this->router; } public function register(IRouteHandler $handler): void { $this->router->register($handler); } public function dispatch(): void { $this->router->dispatch(); } }