private function getLanguageConfiguration(\DOMXPath $xpath, $language, array $defaultConfig)
    {
        $languageCharFilters = $this->parseFilters(
            $xpath,
            self::CHAR_FILTER_TYPE_ROOT_NODE,
            self::CHAR_FILTER_TYPE_NODE,
            $language
        );
        $charFilters = array_merge($defaultConfig[self::CHAR_FILTER_TYPE_NODE], $languageCharFilters);

        $languageFilters = $this->parseFilters(
            $xpath,
            self::FILTER_TYPE_ROOT_NODE,
            self::FILTER_TYPE_NODE,
            $language
        );
        $filters = array_merge($defaultConfig[self::FILTER_TYPE_NODE], $languageFilters);

        $analyzers = $this->parseAnalyzers($xpath, array_keys($charFilters), array_keys($filters), $language);

        $defaultConfiguration = [
            self::CHAR_FILTER_TYPE_NODE => $charFilters,
            self::FILTER_TYPE_NODE      => $filters,
            self::ANALYZER_TYPE_NODE    => $analyzers,
        ];

        return $defaultConfiguration;
    }
private function getLanguageConfiguration(\DOMXPath $xpath, $language, array $defaultConfig)
    {
        $languageCharFilters = $this->parseFilters(
            $xpath,
            self::CHAR_FILTER_TYPE_ROOT_NODE,
            self::CHAR_FILTER_TYPE_NODE,
            $language
        );
        $charFilters = array_merge($defaultConfig[self::CHAR_FILTER_TYPE_NODE], $languageCharFilters);

        $languageFilters = $this->parseFilters(
            $xpath,
            self::FILTER_TYPE_ROOT_NODE,
            self::FILTER_TYPE_NODE,
            $language
        );
        $filters = array_merge($defaultConfig[self::FILTER_TYPE_NODE], $languageFilters);

        $analyzers = $this->parseAnalyzers($xpath, array_keys($charFilters), array_keys($filters), $language);

        $defaultConfiguration = [
            self::CHAR_FILTER_TYPE_NODE => $charFilters,
            self::FILTER_TYPE_NODE      => $filters,
            self::ANALYZER_TYPE_NODE    => $analyzers,
        ];

        return $defaultConfiguration;
    }
private function getLanguageConfiguration ( \ DOMXPath $ xpath , $ language , array $ defaultConfig ) { $ languageCharFilters = $ this -> parseFilters ( $ xpath , self :: CHAR_FILTER_TYPE_ROOT_NODE , self :: CHAR_FILTER_TYPE_NODE , $ language ) ; $ charFilters = array_merge ( $ defaultConfig [ self :: CHAR_FILTER_TYPE_NODE ] , $ languageCharFilters ) ; $ languageFilters = $ this -> parseFilters ( $ xpath , self :: FILTER_TYPE_ROOT_NODE , self :: FILTER_TYPE_NODE , $ language ) ; $ filters = array_merge ( $ defaultConfig [ self :: FILTER_TYPE_NODE ] , $ languageFilters ) ; $ analyzers = $ this -> parseAnalyzers ( $ xpath , array_keys ( $ charFilters ) , array_keys ( $ filters ) , $ language ) ; $ defaultConfiguration = [ self :: CHAR_FILTER_TYPE_NODE => $ charFilters , self :: FILTER_TYPE_NODE => $ filters , self :: ANALYZER_TYPE_NODE => $ analyzers , ] ; return $ defaultConfiguration ; }
Return configuration for a given language.

@param \DOMXPath $xpath         XPath access to the document parsed.
@param string    $language      Current language.
@param array     $defaultConfig Default configuration available for all languages.

@return array
Return configuration for a given language .