yii\db\Connection::getDriverName PHP Method

getDriverName() public method

Returns the name of the DB driver. Based on the the current [[dsn]], in case it was not set explicitly by an end user.
public getDriverName ( ) : string
return string name of the DB driver
    public function getDriverName()
    {
        if ($this->_driverName === null) {
            if (($pos = strpos($this->dsn, ':')) !== false) {
                $this->_driverName = strtolower(substr($this->dsn, 0, $pos));
            } else {
                $this->_driverName = strtolower($this->getSlavePdo()->getAttribute(PDO::ATTR_DRIVER_NAME));
            }
        }
        return $this->_driverName;
    }