chore: lots of changes

This commit is contained in:
2025-05-24 07:09:22 +02:00
parent 77ee769d5e
commit 899227b0a4
178 changed files with 5145 additions and 53 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Framework\Router;
use Closure;
final class RouteContext
{
public null|Closure $handler {
get => $this->isSuccess() ? $this->match->route->method : null;
}
public array $params {
get => $this->isSuccess() ? $this->match->route->parameters : [];
}
public function __construct(
public readonly RouteMatch $match,
public readonly string $method,
public readonly string $path
) {}
public function isSuccess(): bool
{
return $this->match instanceof RouteMatchSuccess;
}
}