public static function importSynonymsFromPlainTextContents(array $synonymFileUpload) : array
    {
        $fileStream = new Stream($synonymFileUpload['tmp_name']);

        $fileLines = GeneralUtility::trimExplode(PHP_EOL, $fileStream->getContents(), true);

        $synonymList = [];
        foreach ($fileLines as $line) {
            $synonymList = self::convertSynonymFileLineForImport($line, $synonymList);
        }

        return $synonymList;
    }
public static function importSynonymsFromPlainTextContents(array $synonymFileUpload) : array
    {
        $fileStream = new Stream($synonymFileUpload['tmp_name']);

        $fileLines = GeneralUtility::trimExplode(PHP_EOL, $fileStream->getContents(), true);

        $synonymList = [];
        foreach ($fileLines as $line) {
            $synonymList = self::convertSynonymFileLineForImport($line, $synonymList);
        }

        return $synonymList;
    }
public static function importSynonymsFromPlainTextContents ( array $ synonymFileUpload ) : array { $ fileStream = new Stream ( $ synonymFileUpload [ 'tmp_name' ] ) ; $ fileLines = GeneralUtility :: trimExplode ( PHP_EOL , $ fileStream -> getContents ( ) , true ) ; $ synonymList = [ ] ; foreach ( $ fileLines as $ line ) { $ synonymList = self :: convertSynonymFileLineForImport ( $ line , $ synonymList ) ; } return $ synonymList ; }
Read plain text synonym file and import these synonyms
@param array $synonymFileUpload
@return array
Read plain text synonym file and import these synonyms