PHP Class Smile\ElasticsuiteCore\Index\Analysis\Config\Converter

Author: Aurelien FOUCRET ([email protected])
Inheritance: implements Magento\Framework\Config\ConverterInterface
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( Magento\Framework\Json\Decoder $jsonDecoder ) Constructor.
convert ( mixed $source ) : array Convert dom node tree to array.

Private Methods

Method Description
getAllLanguages ( DOMXPath $xpath ) : array Parse languages available in the document.
getDefaultConfiguration ( DOMXPath $xpath ) : array Return default configuration available for all languages.
getFiltersByRef ( DOMXPath $xpath, DomNode $rootNode, string $searchPath, array $availableFilters ) : array Return all filters under a root node filtered by an array of available filters.
getLanguageConfiguration ( DOMXPath $xpath, string $language, array $defaultConfig ) : array Return configuration for a given language.
parseAnalyzers ( DOMXPath $xpath, array $availableCharFilters, array $availableFilters, string $language = 'default' ) : array Analyzers parser by language.
parseFilters ( DOMXPath $xpath, string $rootNodeName, string $nodeName, string $language = 'default' ) : array Filters parser by language.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\Json\Decoder $jsonDecoder )
$jsonDecoder Magento\Framework\Json\Decoder JSON Decoder.

convert() public method

Convert dom node tree to array.
public convert ( mixed $source ) : array
$source mixed Configuration XML source.
return array