static function getInstance()
    {
        if (\array_key_exists('default', static::$connections)) {
            return static::$connections['default'];
        }

        $config = Config::getInstance();

        $params = new ConnectionParams();
        $params->id = 'default';
        $params->host = $config->host;
        $params->user = $config->user;
        $params->password = $config->password;
        $params->database = $config->database;
        $params->charset = $config->charset;
        $params->persistent = $config->persistent;

        return static::factory($params);
    }