/** * Construct from full text search configuration. * * @param \eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler * @param \eZ\Publish\Core\Persistence\TransformationProcessor $processor * @param array $configuration * * @throws InvalidArgumentException On invalid $configuration values */ 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']); } }
/** * Construct from language mask generator * * @param \eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler * @param \eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator $maskGenerator */ public function __construct(DatabaseHandler $dbHandler, MaskGenerator $maskGenerator) { $this->maskGenerator = $maskGenerator; parent::__construct($dbHandler); }
/** * Construct from handler handler. * * @param \eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler * @param \eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler */ public function __construct(DatabaseHandler $dbHandler, ContentTypeHandler $contentTypeHandler) { parent::__construct($dbHandler); $this->contentTypeHandler = $contentTypeHandler; }
/** * Construct from full text search configuration * * @param \eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler * @param \eZ\Publish\Core\Persistence\TransformationProcessor $processor * @param array $configuration */ public function __construct(DatabaseHandler $dbHandler, TransformationProcessor $processor, array $configuration = array()) { parent::__construct($dbHandler); $this->configuration = $configuration + $this->configuration; $this->processor = $processor; }