diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | 8c0efd0d9317ad92bd55cd6afcd41bdbab827bf8 (patch) | |
| tree | c654456753e90ab38b7bcb89ece3381ad7a40f4a /src/Route.php | |
| parent | 5fe7c87967ff29c4a8f03a9186918d8359f4887e (diff) | |
Make basic routing work
Diffstat (limited to 'src/Route.php')
| -rw-r--r-- | src/Route.php | 11 |
1 files changed, 5 insertions, 6 deletions
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; + } } |
