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

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

Create MATCH expressions for zones.
public buildZoneMatch ( 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 buildZoneMatch($operator, $operands, &$params)
    {
        if (!isset($operands[0])) {
            throw new InvalidParamException("Operator '{$operator}' requires exactly one operand.");
        }
        $zones = (array) $operands[0];
        return "{$operator}: (" . implode(',', $zones) . ")";
    }