yii\mongodb\QueryBuilder::buildOrCondition PHP Method

buildOrCondition() public method

Connects two or more conditions with the OR operator.
public buildOrCondition ( string $operator, array $operands ) : array
$operator string the operator to use for connecting the given operands
$operands array the Mongo conditions to connect.
return array the generated Mongo condition.
    public function buildOrCondition($operator, $operands)
    {
        $operator = $this->normalizeConditionKeyword($operator);
        $parts = [];
        foreach ($operands as $operand) {
            $parts[] = $this->buildCondition($operand);
        }
        return [$operator => $parts];
    }