segment = $segment; } public function getId(): int { $id = $this->segment->getId(); if (!$id) { throw new InvalidStateException(); } return $id; } public function getName(): string { return $this->segment->getName(); } public function getType(): string { return $this->segment->getType(); } }