framework/db/conditions/InConditionBuilder.php
protected function buildValues(ConditionInterface $condition, $values, &$params)
    {
        $sqlValues = [];
        $column = $condition->getColumn();

        if (is_array($column)) {
            $column = reset($column);
        }

        if ($column instanceof \Traversable) {
            $column->rewind();
            $column = $column->current();
        }

        foreach ($values as $i => $value) {
            if (is_array($value) || $value instanceof \ArrayAccess) {
                $value = isset($value[$column]) ? $value[$column] : null;
            }
            if ($value === null) {
                $sqlValues[$i] = 'NULL';
            } elseif ($value instanceof ExpressionInterface) {
                $sqlValues[$i] = $this->queryBuilder->buildExpression($value, $params);
            } else {
                $sqlValues[$i] = $this->queryBuilder->bindParam($value, $params);
            }
        }

        return $sqlValues;
    }
protected function buildValues(ConditionInterface $condition, $values, &$params)
    {
        $sqlValues = [];
        $column = $condition->getColumn();

        if (is_array($column)) {
            $column = reset($column);
        }

        if ($column instanceof \Traversable) {
            $column->rewind();
            $column = $column->current();
        }

        foreach ($values as $i => $value) {
            if (is_array($value) || $value instanceof \ArrayAccess) {
                $value = isset($value[$column]) ? $value[$column] : null;
            }
            if ($value === null) {
                $sqlValues[$i] = 'NULL';
            } elseif ($value instanceof ExpressionInterface) {
                $sqlValues[$i] = $this->queryBuilder->buildExpression($value, $params);
            } else {
                $sqlValues[$i] = $this->queryBuilder->bindParam($value, $params);
            }
        }

        return $sqlValues;
    }
protected function buildValues ( ConditionInterface $ condition , $ values , & $ params ) { $ sqlValues = [ ] ; $ column = $ condition -> getColumn ( ) ; if ( is_array ( $ column ) ) { $ column = reset ( $ column ) ; } if ( $ column instanceof \ Traversable ) { $ column -> rewind ( ) ; $ column = $ column -> current ( ) ; } foreach ( $ values as $ i => $ value ) { if ( is_array ( $ value ) || $ value instanceof \ ArrayAccess ) { $ value = isset ( $ value [ $ column ] ) ? $ value [ $ column ] : null ; } if ( $ value === null ) { $ sqlValues [ $ i ] = 'NULL' ; } elseif ( $ value instanceof ExpressionInterface ) { $ sqlValues [ $ i ] = $ this -> queryBuilder -> buildExpression ( $ value , $ params ) ; } else { $ sqlValues [ $ i ] = $ this -> queryBuilder -> bindParam ( $ value , $ params ) ; } } return $ sqlValues ; }
Builds $values to be used in [[InCondition]]

@param ConditionInterface|InCondition $condition
@param array $values
@param array $params the binding parameters
@return array of prepared for SQL placeholders
Builds $values to be used in [[ InCondition ]]