Module.php
private function createCharsetTableVariables(array $config, $encoding_type = 'utf8')
    {
        if (isset($config['sphinxsearch']) && file_exists(__DIR__ . '/config/sphinx.charset.utf8.config.php')) {
            $charsetConfig = include __DIR__ . '/config/sphinx.charset.utf8.config.php';
            $languages = $charsetConfig['languages'];
            $defaults = $charsetConfig['defaults'];
            $prefix = 'charset_' . $encoding_type . '_';
            // Inject default charset table variables
            foreach ($defaults as $name => $table) {
                $config['sphinxsearch']['variables'][$prefix . $name] = $table;
            }
            $default = implode(', ', $defaults);
            $config['sphinxsearch']['variables'][$prefix . 'default'] = $default;
            // Inject language charset table variables
            foreach ($languages as $lang => $table) {
                if (empty($table)) {
                    $config['sphinxsearch']['variables'][$prefix . $lang] = $default;
                } else {
                    $alphanum = '';
                    $alphanum .= $config['sphinxsearch']['variables'][$prefix . 'digits'] . ', ';
                    $alphanum .= $config['sphinxsearch']['variables'][$prefix . 'alphabet'];
                    $config['sphinxsearch']['variables'][$prefix . $lang] = $alphanum . ', ' . $table;
                }
            }
        }
        return $config;
    }
private function createCharsetTableVariables(array $config, $encoding_type = 'utf8')
    {
        if (isset($config['sphinxsearch']) && file_exists(__DIR__ . '/config/sphinx.charset.utf8.config.php')) {
            $charsetConfig = include __DIR__ . '/config/sphinx.charset.utf8.config.php';
            $languages = $charsetConfig['languages'];
            $defaults = $charsetConfig['defaults'];
            $prefix = 'charset_' . $encoding_type . '_';
            // Inject default charset table variables
            foreach ($defaults as $name => $table) {
                $config['sphinxsearch']['variables'][$prefix . $name] = $table;
            }
            $default = implode(', ', $defaults);
            $config['sphinxsearch']['variables'][$prefix . 'default'] = $default;
            // Inject language charset table variables
            foreach ($languages as $lang => $table) {
                if (empty($table)) {
                    $config['sphinxsearch']['variables'][$prefix . $lang] = $default;
                } else {
                    $alphanum = '';
                    $alphanum .= $config['sphinxsearch']['variables'][$prefix . 'digits'] . ', ';
                    $alphanum .= $config['sphinxsearch']['variables'][$prefix . 'alphabet'];
                    $config['sphinxsearch']['variables'][$prefix . $lang] = $alphanum . ', ' . $table;
                }
            }
        }
        return $config;
    }
private function createCharsetTableVariables ( array $ config , $ encoding_type = 'utf8' ) { if ( isset ( $ config [ 'sphinxsearch' ] ) && file_exists ( __DIR__ . '/config/sphinx.charset.utf8.config.php' ) ) { $ charsetConfig = include __DIR__ . '/config/sphinx.charset.utf8.config.php' ; $ languages = $ charsetConfig [ 'languages' ] ; $ defaults = $ charsetConfig [ 'defaults' ] ; $ prefix = 'charset_' . $ encoding_type . '_' ; // Inject default charset table variables foreach ( $ defaults as $ name => $ table ) { $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . $ name ] = $ table ; } $ default = implode ( ', ' , $ defaults ) ; $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . 'default' ] = $ default ; // Inject language charset table variables foreach ( $ languages as $ lang => $ table ) { if ( empty ( $ table ) ) { $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . $ lang ] = $ default ; } else { $ alphanum = '' ; $ alphanum .= $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . 'digits' ] . ', ' ; $ alphanum .= $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . 'alphabet' ] ; $ config [ 'sphinxsearch' ] [ 'variables' ] [ $ prefix . $ lang ] = $ alphanum . ', ' . $ table ; } } } return $ config ; }
Read Sphinx Search charset tables and create variables to expose them

@param array $config
@param $encoding_type
@return array
Read Sphinx Search charset tables and create variables to expose them