public function buildAndMatch($operator, $operands, &$params)
    {
        $parts = [];
        foreach ($operands as $operand) {
            if (is_array($operand) || is_object($operand)) {
                $operand = $this->buildMatch($operand, $params);
            }

            if ($operand !== '') {
                $parts[] = $operand;
            }
        }

        if (empty($parts)) {
            return '';
        }

        return '(' . implode(')' . ($operator === 'OR' ? ' | ' : ' ') . '(', $parts) . ')';
    }
public function buildAndMatch($operator, $operands, &$params)
    {
        $parts = [];
        foreach ($operands as $operand) {
            if (is_array($operand) || is_object($operand)) {
                $operand = $this->buildMatch($operand, $params);
            }

            if ($operand !== '') {
                $parts[] = $operand;
            }
        }

        if (empty($parts)) {
            return '';
        }

        return '(' . implode(')' . ($operator === 'OR' ? ' | ' : ' ') . '(', $parts) . ')';
    }
public function buildAndMatch ( $ operator , $ operands , & $ params ) { $ parts = [ ] ; foreach ( $ operands as $ operand ) { if ( is_array ( $ operand ) || is_object ( $ operand ) ) { $ operand = $ this -> buildMatch ( $ operand , $ params ) ; } if ( $ operand !== '' ) { $ parts [ ] = $ operand ; } } if ( empty ( $ parts ) ) { return '' ; } return '(' . implode ( ')' . ( $ operator === 'OR' ? ' | ' : ' ' ) . '(' , $ parts ) . ')' ; }
Connects two or more MATCH expressions with the `AND` or `OR` operator
@param string $operator the operator which is used for connecting the given operands
@param array $operands the Match expressions to connect
@param array $params the expression parameters to be populated
@return string the MATCH expression
Connects two or more MATCH expressions with the AND or OR operator