public function buildDsn(array $config, $id)
    {
        if (!isset($config['type'])) {
            throw new JAQBException('Missing connection type for configuration "'.$id.'"!');
        }

        $dsn = $config['type'].':';
        $params = [];
        foreach (self::$connectionParams as $j => $k) {
            if (isset($config[$j])) {
                $params[] = $k.'='.$config[$j];
            }
        }
        $dsn .= implode(';', $params);

        return $dsn;
    }
public function buildDsn(array $config, $id)
    {
        if (!isset($config['type'])) {
            throw new JAQBException('Missing connection type for configuration "'.$id.'"!');
        }

        $dsn = $config['type'].':';
        $params = [];
        foreach (self::$connectionParams as $j => $k) {
            if (isset($config[$j])) {
                $params[] = $k.'='.$config[$j];
            }
        }
        $dsn .= implode(';', $params);

        return $dsn;
    }
public function buildDsn ( array $ config , $ id ) { if ( ! isset ( $ config [ 'type' ] ) ) { throw new JAQBException ( 'Missing connection type for configuration "' . $ id . '"!' ) ; } $ dsn = $ config [ 'type' ] . ':' ; $ params = [ ] ; foreach ( self :: $ connectionParams as $ j => $ k ) { if ( isset ( $ config [ $ j ] ) ) { $ params [ ] = $ k . '=' . $ config [ $ j ] ; } } $ dsn .= implode ( ';' , $ params ) ; return $ dsn ; }
Builds a PDO DSN string from a JAQB connection configuration.

@param array  $config
@param string $id     configuration ID

@throws JAQBException if the configuration is invalid

@return string
Builds a PDO DSN string from a JAQB connection configuration .