diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:33 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:33 +0100 |
| commit | 7144cad2df09b68a7359955242aabef746a826b3 (patch) | |
| tree | 8d53162bb19aba1e49f1cdbfb224992152841b2c /src/Group.php | |
| parent | fdb23965a0daf06e85de4fc11a83e5f96656cc81 (diff) | |
Setup structure for storing middleware and added test todos
Diffstat (limited to 'src/Group.php')
| -rw-r--r-- | src/Group.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Group.php b/src/Group.php index 05fa93b..9faae2c 100644 --- a/src/Group.php +++ b/src/Group.php @@ -4,16 +4,22 @@ declare(strict_types=1); namespace Lightscale\Router; +use Lightscale\Router\Contracts\Middleware; + class Group { use Concerns\HasAncestors; + use Concerns\HasMiddleware; + /** @param Middleware[] $middleware */ public function __construct( private Router $router, private ?Group $parent, private ?string $prefix = null, private ?string $name = null, + array $middleware = [], ) { + $this->middleware = $middleware; } public function getRouter(): Router |
