router = new HttpFx; $this->router->use('/', fn($resp) => $resp->setPoweredBy('Seria')); } public function getRouter(): IRouter { return $this->router; } public function registerDefaultErrorPages(): void { $this->router->setDefaultErrorHandler($this->defaultErrorHandler(...)); $this->router->addErrorHandler(500, fn($resp) => $resp->setContent(file_get_contents(SERIA_DIR_TEMPLATES . '/500.html'))); } public function defaultErrorHandler( HttpResponseBuilder $responseBuilder, HttpRequest $request, int $code, string $message ): void { // todo: render using templating $responseBuilder->setTypeHTML(); $responseBuilder->setContent(sprintf( '