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

__construct() public method

Creates a new criterion handler.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler )
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler
    public function __construct(DatabaseHandler $dbHandler)
    {
        $this->dbHandler = $dbHandler;
    }

Usage Example

 /**
  * 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']);
     }
 }
All Usage Examples Of eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler::__construct