yii\sphinx\MatchBuilder::buildProximityMatch PHP Метод

buildProximityMatch() публичный Метод

Create PROXIMITY expressions
public buildProximityMatch ( string $operator, array $operands, &$params ) : string
$operator string the operator which is used for Create Match expressions
$operands array the Match expressions
Результат string the MATCH expression
    public function buildProximityMatch($operator, $operands, &$params)
    {
        if (!isset($operands[0], $operands[1], $operands[2])) {
            throw new InvalidParamException("Operator '{$operator}' requires three operands.");
        }
        list($column, $value, $proximity) = $operands;
        return $this->buildMatchColumn($column) . ' ' . $this->buildMatchValue($value, $params) . '~' . (int) $proximity;
    }