src/Db/MySQL.php
public static function getInstance($driverName = null): AbstractMySQL
    {
        if (!static::$initialized) {
            static::$baseClass = Base::getInstance();
        }
        $driverName = $driverName!==null
            ? '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\'.$driverName
            : '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\'.((string) static::$baseClass->Database->MySQL->driverClass);
        /** @noinspection PhpUndefinedMethodInspection */
        $driver = $driverName::getInstance();

        // @codeCoverageIgnoreStart
        if (!($driver instanceof AbstractMySQL)) {
            throw new RuntimeException('MySQL driver must extend \\MS\\LightFramework\\Db\\MySQL\\AbstractMySQL');
        }
        // @codeCoverageIgnoreEnd

        return $driver;
    }
public static function getInstance($driverName = null): AbstractMySQL
    {
        if (!static::$initialized) {
            static::$baseClass = Base::getInstance();
        }
        $driverName = $driverName!==null
            ? '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\'.$driverName
            : '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\'.((string) static::$baseClass->Database->MySQL->driverClass);
        /** @noinspection PhpUndefinedMethodInspection */
        $driver = $driverName::getInstance();

        // @codeCoverageIgnoreStart
        if (!($driver instanceof AbstractMySQL)) {
            throw new RuntimeException('MySQL driver must extend \\MS\\LightFramework\\Db\\MySQL\\AbstractMySQL');
        }
        // @codeCoverageIgnoreEnd

        return $driver;
    }
public static function getInstance ( $ driverName = null ) : AbstractMySQL { if ( ! static :: $ initialized ) { static :: $ baseClass = Base :: getInstance ( ) ; } $ driverName = $ driverName !== null ? '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\' . $ driverName : '\\MS\\LightFramework\\Db\\MySQL\\Drivers\\' . ( ( string ) static :: $ baseClass -> Database -> MySQL -> driverClass ) ; /** @noinspection PhpUndefinedMethodInspection */ $ driver = $ driverName :: getInstance ( ) ; // @codeCoverageIgnoreStart if ( ! ( $ driver instanceof AbstractMySQL ) ) { throw new RuntimeException ( 'MySQL driver must extend \\MS\\LightFramework\\Db\\MySQL\\AbstractMySQL' ) ; } // @codeCoverageIgnoreEnd return $ driver ; }
Returns MySQL driver according to configuration.

@param string|null $driverName
@return AbstractMySQL
Returns MySQL driver according to configuration .