, dynamic: array}> */ private array $routes; public function __construct(array $routes) { $this->routes = $routes; } public function getStatic(string $method): array { return $this->routes[$method]['static'] ?? []; } public function getDynamic(string $method): array { return $this->routes[$method]['dynamic'] ?? []; } public function has(string $method): bool { return isset($this->routes[$method]); } }