diff options
Diffstat (limited to 'src/Routing/RouteDef.php')
| -rw-r--r-- | src/Routing/RouteDef.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Routing/RouteDef.php b/src/Routing/RouteDef.php new file mode 100644 index 0000000..9d54ff0 --- /dev/null +++ b/src/Routing/RouteDef.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); + +namespace BrettParson\MiniRoute\Routing; + +/** + * A compiled route: one controller method plus its method, path, and + * middleware. + */ +final class RouteDef +{ + /** + * @param list<string> $middleware Middleware class names, outermost first. + */ + public function __construct( + public readonly string $method, + public readonly string $path, + public readonly string $controllerClass, + public readonly string $controllerMethod, + public readonly array $middleware = [], + ) { + } +} |
