eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FullText::__construct PHP Method

__construct() public method

Construct from full text search configuration.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler, TransformationProcessor $processor, array $configuration = [] )
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler
$processor eZ\Publish\Core\Persistence\TransformationProcessor
$configuration array
    public function __construct(DatabaseHandler $dbHandler, TransformationProcessor $processor, array $configuration = array())
    {
        parent::__construct($dbHandler);
        $this->configuration = $configuration + $this->configuration;
        $this->processor = $processor;
        if ($this->configuration['stopWordThresholdFactor'] < 0 || $this->configuration['stopWordThresholdFactor'] > 1) {
            throw new InvalidArgumentException("\$configuration['stopWordThresholdFactor']", 'Stop Word Threshold Factor needs to be between 0 and 1, got: ' . $this->configuration['stopWordThresholdFactor']);
        }
    }