mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-18 15:31:06 +08:00
Fixed issue #7674
This commit is contained in:
committed by
SilverFire - Dmitry Naumenko
parent
91204dd6c6
commit
aa36f63f4c
@@ -337,6 +337,12 @@ class Connection extends Component
|
||||
* @see masterConfig
|
||||
*/
|
||||
public $masters = [];
|
||||
/**
|
||||
* @var string the class name of the [[Command]] object.
|
||||
*/
|
||||
public $commandClass = 'yii\db\Command';
|
||||
|
||||
|
||||
/**
|
||||
* @var array the configuration that should be merged with every master configuration listed in [[masters]].
|
||||
* For example,
|
||||
@@ -618,9 +624,10 @@ class Connection extends Component
|
||||
*/
|
||||
public function createCommand($sql = null, $params = [])
|
||||
{
|
||||
$command = new Command([
|
||||
$command = Yii::createObject([
|
||||
'class' => $this->commandClass,
|
||||
'db' => $this,
|
||||
'sql' => $sql,
|
||||
'sql' => $sql
|
||||
]);
|
||||
|
||||
return $command->bindValues($params);
|
||||
|
||||
Reference in New Issue
Block a user