diff --git a/src/RoutingContext.php b/src/RoutingContext.php index a6c1c04..cd747e4 100644 --- a/src/RoutingContext.php +++ b/src/RoutingContext.php @@ -9,6 +9,7 @@ class RoutingContext { public function __construct(SeriaContext $context) { $this->router = new HttpRouter(errorHandler: new RoutingErrorHandler($context)); $this->router->use('/', fn($resp) => $resp->setPoweredBy('Seria')); + $this->router->registerContentHandler(new StringableContentHandler); // this should really be in Index lol but i can't be bothered rn! } public function getRouter(): IRouter { diff --git a/src/StringableContentHandler.php b/src/StringableContentHandler.php new file mode 100644 index 0000000..7d71e75 --- /dev/null +++ b/src/StringableContentHandler.php @@ -0,0 +1,18 @@ +setContent(new StringContent((string)$content)); + } +}