Initial Version

This commit is contained in:
root
2025-12-21 10:09:54 -05:00
commit 4ae6befc7b
422 changed files with 47225 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace KTXC\Routing;
/**
* Value object representing a resolved route.
*/
class Route
{
/** @var array<string, string> Route parameters extracted from path */
public array $params = [];
public function __construct(
public readonly string $name,
public readonly string $method,
public readonly string $path,
public readonly bool $authenticated,
public readonly string $className,
public readonly string $classMethodName,
public readonly array $classMethodParameters = [],
public readonly array $permissions = [],
) {}
public function withParams(array $params): self
{
$clone = clone $this;
$clone->params = $params;
return $clone;
}
}