src/DB.php
public static function connectDb() {
        if 
            (!isset(self::$dbLink)) {
            $dbParams = self::getDatabaseParameters();
            self::validateDbParameters($dbParams);
            $dbParamsSan = self::sanitizeDbParameters($dbParams);
            $config = new Configuration();
            self::$dbLink = DriverManager::getConnection($dbParamsSan, $config);
        }
        
        return self::$dbLink;
    }
public static function connectDb() {
        if 
            (!isset(self::$dbLink)) {
            $dbParams = self::getDatabaseParameters();
            self::validateDbParameters($dbParams);
            $dbParamsSan = self::sanitizeDbParameters($dbParams);
            $config = new Configuration();
            self::$dbLink = DriverManager::getConnection($dbParamsSan, $config);
        }
        
        return self::$dbLink;
    }
public static function connectDb ( ) { if ( ! isset ( self :: $ dbLink ) ) { $ dbParams = self :: getDatabaseParameters ( ) ; self :: validateDbParameters ( $ dbParams ) ; $ dbParamsSan = self :: sanitizeDbParameters ( $ dbParams ) ; $ config = new Configuration ( ) ; self :: $ dbLink = DriverManager :: getConnection ( $ dbParamsSan , $ config ) ; } return self :: $ dbLink ; }
Create a database connection or return singleton connection using environment settings

@param   connectParams - Associative array of connection parameters

@return  Doctrine\DBAL
Create a database connection or return singleton connection using environment settings