router; } public function getParent(): ?self { return $this->parent; } public function prefix(string $value): static { $this->prefix = $value; return $this; } public function getPrefix(): ?string { return $this->prefix; } public function getPath(): string { $ancestors = $this->getAncestorsAndSelf(); return '/' . implode('/', array_filter( array_map(fn(Group $g): ?string => ( ($v = $g->getPrefix()) === null ? null : trim($v, '/') ), $ancestors), fn (?string $v) => $v !== null )); } public function name(string $value): static { $this->name = $value; return $this; } public function getName(): ?string { return $this->name; } /** @param callable(GroupDefinition): void $cb */ public function group(callable $cb): void { ($cb)(new GroupDefinition( $this )); } }