This commit is contained in:
Sam Mousa
2016-02-03 13:55:32 +01:00
committed by SilverFire - Dmitry Naumenko
parent 91204dd6c6
commit aa36f63f4c

View File

@@ -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);