vendor/yiisoft/yii2/db/Command.php
/**
     * Binds a list of values to the corresponding parameters.
     * This is similar to [[bindValue()]] except that it binds multiple values at a time.
     * Note that the SQL data type of each value is determined by its PHP type.
     * @param array $values the values to be bound. This must be given in terms of an associative
     * array with array keys being the parameter names, and array values the corresponding parameter values,
     * e.g. `[':name' => 'John', ':age' => 25]`. By default, the PDO type of each value is determined
     * by its PHP type. You may explicitly specify the PDO type by using an array: `[value, type]`,
     * e.g. `[':name' => 'John', ':profile' => [$profile, \PDO::PARAM_LOB]]`.
     * @return static the current command being executed
     */
Binds a list of values to the corresponding parameters.
This is similar to [[bindValue()]] except that it binds multiple values at a time.
Note that the SQL data type of each value is determined by its PHP type.
@param array $values the values to be bound. This must be given in terms of an associative
array with array keys being the parameter names, and array values the corresponding parameter values,
e.g.
Binds a list of values to the corresponding parameters . This is similar to [[ bindValue () ]] except that it binds multiple values at a time . Note that the SQL data type of each value is determined by its PHP type . @param array $values the values to be bound . This must be given in terms of an associative array with array keys being the parameter names and array values the corresponding parameter values e . g .
public function bindValues($values)
    {
        if (empty($values)) {
            return $this;
        }
        $schema = $this->db->getSchema();
        foreach ($values as $name => $value) {
            if (is_array($value)) {
                $this->_pendingParams[$name] = $value;
                $this->params[$name] = $value[0];
            } else {
                $type = $schema->getPdoType($value);
                $this->_pendingParams[$name] = [$value, $type];
                $this->params[$name] = $value;
            }
        }
        return $this;
    }
public function bindValues ( $ values ) { if ( empty ( $ values ) ) { return $ this ; } $ schema = $ this -> db -> getSchema ( ) ; foreach ( $ values as $ name => $ value ) { if ( is_array ( $ value ) ) { $ this -> _pendingParams [ $ name ] = $ value ; $ this -> params [ $ name ] = $ value [ 0 ] ; } else { $ type = $ schema -> getPdoType ( $ value ) ; $ this -> _pendingParams [ $ name ] = [ $ value , $ type ] ; $ this -> params [ $ name ] = $ value ; } } return $ this ; }
Binds a list of values to the corresponding parameters.
Binds a list of values to the corresponding parameters .