/** * Creates a command for execution. * @param array $config The configuration for the Command class. * @return Command the DB command */ public function createCommand(array $config = []) { $command = Yii::createObject(array_merge($config, ['class' => Command::className(), 'db' => $this])); return $command; }