mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 07:11:19 +08:00
Remove deprecated methods to Connection::class
.
This commit is contained in:
@ -289,15 +289,6 @@ class Connection extends Component
|
|||||||
* @see pdo
|
* @see pdo
|
||||||
*/
|
*/
|
||||||
public $pdoClass;
|
public $pdoClass;
|
||||||
/**
|
|
||||||
* @var string the class used to create new database [[Command]] objects. If you want to extend the [[Command]] class,
|
|
||||||
* you may configure this property to use your extended version of the class.
|
|
||||||
* Since version 2.0.14 [[$commandMap]] is used if this property is set to its default value.
|
|
||||||
* @see createCommand
|
|
||||||
* @since 2.0.7
|
|
||||||
* @deprecated since 2.0.14. Use [[$commandMap]] for precise configuration.
|
|
||||||
*/
|
|
||||||
public $commandClass = 'yii\db\Command';
|
|
||||||
/**
|
/**
|
||||||
* @var array mapping between PDO driver names and [[Command]] classes.
|
* @var array mapping between PDO driver names and [[Command]] classes.
|
||||||
* The keys of the array are PDO driver names while the values are either the corresponding
|
* The keys of the array are PDO driver names while the values are either the corresponding
|
||||||
@ -760,9 +751,7 @@ class Connection extends Component
|
|||||||
{
|
{
|
||||||
$driver = $this->getDriverName();
|
$driver = $this->getDriverName();
|
||||||
$config = ['class' => 'yii\db\Command'];
|
$config = ['class' => 'yii\db\Command'];
|
||||||
if ($this->commandClass !== $config['class']) {
|
if (isset($this->commandMap[$driver])) {
|
||||||
$config['class'] = $this->commandClass;
|
|
||||||
} elseif (isset($this->commandMap[$driver])) {
|
|
||||||
$config = !is_array($this->commandMap[$driver]) ? ['class' => $this->commandMap[$driver]] : $this->commandMap[$driver];
|
$config = !is_array($this->commandMap[$driver]) ? ['class' => $this->commandMap[$driver]] : $this->commandMap[$driver];
|
||||||
}
|
}
|
||||||
$config['db'] = $this;
|
$config['db'] = $this;
|
||||||
|
Reference in New Issue
Block a user