portalEnum = null; $this->connection = null; } else { $this->portalEnum = Portal::from($portal); $this->connection = match ($portal) { 'presseecho' => 'mysql_presseecho', 'businessportal24' => 'mysql_businessportal', default => throw new \InvalidArgumentException("Unbekanntes Portal: {$portal}"), }; } } public function legacyPortalValue(): string { return $this->portal; } }