From 8c0efd0d9317ad92bd55cd6afcd41bdbab827bf8 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: Make basic routing work --- src/Route.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Route.php') diff --git a/src/Route.php b/src/Route.php index aeb3f66..af08ded 100644 --- a/src/Route.php +++ b/src/Route.php @@ -6,7 +6,6 @@ namespace Lightscale\Router; use Closure; use Lightscale\Router\Enums\HttpMethod; -use Psr\Http\Message\RequestInterface; class Route { @@ -26,11 +25,6 @@ class Route } } - public function __invoke(RequestInterface $request): mixed - { - return ($this->handler)($request); - } - public function getMethod(): HttpMethod { return $this->method; @@ -50,4 +44,9 @@ class Route { return $this->segment->getPath(); } + + public function getHandler(): Closure + { + return $this->handler; + } } -- cgit v1.2.3