yii\mongodb\QueryBuilder::buildOrCondition PHP Метод

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

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.
Результат 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];
    }