Property | Type | Description | |
---|---|---|---|
$db | the Sphinx connection. |
Property | Type | Description | |
---|---|---|---|
$matchBuilders | map of MATCH keywords to builder methods. These methods are used by [[buildMatch]] to build MATCH expression from array syntax. | ||
$matchOperators | map of MATCH operators. These operators are used for replacement of verbose operators. |
Method | Description | |
---|---|---|
__construct ( |
Constructor. | |
build ( |
Generates the MATCH expression from given MatchExpression object. | |
buildAndMatch ( string $operator, array $operands, array &$params ) : string | Connects two or more MATCH expressions with the AND or OR operator | |
buildHashMatch ( array $match, array &$params ) : string | Creates a MATCH based on column-value pairs. | |
buildIgnoreMatch ( string $operator, array $operands, &$params ) : string | Create ignored MATCH expressions | |
buildMatch ( string | array $match, array &$params ) : string | Create MATCH expression. | |
buildMultipleMatch ( string $operator, array $operands, &$params ) : string | Create MAYBE, SENTENCE or PARAGRAPH expressions. | |
buildProximityMatch ( string $operator, array $operands, &$params ) : string | Create PROXIMITY expressions | |
buildSimpleMatch ( string $operator, array $operands, array &$params ) : string | Creates an Match expressions like "column" operator value. | |
buildZoneMatch ( string $operator, array $operands, &$params ) : string | Create MATCH expressions for zones. |
Method | Description | |
---|---|---|
buildMatchColumn ( string $column, boolean $ignored = false ) : string | Created column as string for expression of MATCH | |
buildMatchValue ( string | array | yii\db\Expression $value, array &$params ) : string | Create placeholder for expression of MATCH | |
parseParams ( string $expression, array $params ) : string | Returns the actual MATCH expression by inserting parameter values into the corresponding placeholders. |
public __construct ( |
||
$connection | the Sphinx connection. | |
$config | array | name-value pairs that will be used to initialize the object properties |
public buildAndMatch ( string $operator, array $operands, array &$params ) : string | ||
$operator | string | the operator which is used for connecting the given operands |
$operands | array | the Match expressions to connect |
$params | array | the expression parameters to be populated |
return | string | the MATCH expression |
public buildSimpleMatch ( string $operator, array $operands, array &$params ) : string | ||
$operator | string | the operator to use. Anything could be used e.g. `>`, `<=`, etc. |
$operands | array | contains two column names. |
$params | array | the expression parameters to be populated |
return | string | the MATCH expression |
protected $matchBuilders |