protected static function convertSynonymFileLineForImport($line, $synonymList) : array
    {
        $lineParts = GeneralUtility::trimExplode('=>', $line, true);

        if (isset($lineParts[1])) {
            $baseWord = mb_strtolower($lineParts[0]);
            $synonyms = GeneralUtility::trimExplode(',', mb_strtolower($lineParts[1]), true);
        } else {
            $synonyms = GeneralUtility::trimExplode(',', mb_strtolower($lineParts[0]), true);
            $baseWord = mb_strtolower(reset($synonyms));
        }
        $synonymList[$baseWord] = $synonyms;

        return $synonymList;
    }
protected static function convertSynonymFileLineForImport($line, $synonymList) : array
    {
        $lineParts = GeneralUtility::trimExplode('=>', $line, true);

        if (isset($lineParts[1])) {
            $baseWord = mb_strtolower($lineParts[0]);
            $synonyms = GeneralUtility::trimExplode(',', mb_strtolower($lineParts[1]), true);
        } else {
            $synonyms = GeneralUtility::trimExplode(',', mb_strtolower($lineParts[0]), true);
            $baseWord = mb_strtolower(reset($synonyms));
        }
        $synonymList[$baseWord] = $synonyms;

        return $synonymList;
    }
protected static function convertSynonymFileLineForImport ( $ line , $ synonymList ) : array { $ lineParts = GeneralUtility :: trimExplode ( '=>' , $ line , true ) ; if ( isset ( $ lineParts [ 1 ] ) ) { $ baseWord = mb_strtolower ( $ lineParts [ 0 ] ) ; $ synonyms = GeneralUtility :: trimExplode ( ',' , mb_strtolower ( $ lineParts [ 1 ] ) , true ) ; } else { $ synonyms = GeneralUtility :: trimExplode ( ',' , mb_strtolower ( $ lineParts [ 0 ] ) , true ) ; $ baseWord = mb_strtolower ( reset ( $ synonyms ) ) ; } $ synonymList [ $ baseWord ] = $ synonyms ; return $ synonymList ; }
Convert synonym file line for import
@param string $line
@param array $synonymList
@return array
Convert synonym file line for import