original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Builds a PDO DSN string from a JAQB connection configuration .