diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:31 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:31 +0100 |
| commit | 26e20ef1a14f0734f6082dfb20a05fbcd6809165 (patch) | |
| tree | 055c1722dcf9fe92d0ce5174d3caec6a1b4b6002 /src/Route.php | |
| parent | 32511fddf6fae7d1d9c194e15e0286274bc91ca6 (diff) | |
created some basic structure classes
Diffstat (limited to 'src/Route.php')
| -rw-r--r-- | src/Route.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Route.php b/src/Route.php new file mode 100644 index 0000000..1a9ad03 --- /dev/null +++ b/src/Route.php @@ -0,0 +1,21 @@ +<?php + +declare(strict_types=1); + +namespace Lightscale\Router; + +use Closure; +use Lightscale\Router\Enums\HttpMethod; + +class Route +{ + protected Closure $handler; + + public function __construct( + protected PathSegment $segment, + protected HttpMethod $method, + callable $handler, + ) { + $this->handler = Closure::fromCallable($handler); + } +} |
