private function parseDsn($dsn) {
    $parsed = array();

    $typeEnd = strpos($dsn, ':');
    $dbType = substr($dsn, 0, $typeEnd);
    $parsed['dbtype'] = $dbType;

    $dsn = substr($dsn, $typeEnd+1);

    $parts = explode(';', $dsn);
    foreach($parts as $part) {
      list($key, $val) = explode('=', $part);
      $parsed[$key] = $val;
    }

    return $parsed;
  }
private function parseDsn($dsn) {
    $parsed = array();

    $typeEnd = strpos($dsn, ':');
    $dbType = substr($dsn, 0, $typeEnd);
    $parsed['dbtype'] = $dbType;

    $dsn = substr($dsn, $typeEnd+1);

    $parts = explode(';', $dsn);
    foreach($parts as $part) {
      list($key, $val) = explode('=', $part);
      $parsed[$key] = $val;
    }

    return $parsed;
  }
private function parseDsn ( $ dsn ) { $ parsed = array ( ) ; $ typeEnd = strpos ( $ dsn , ':' ) ; $ dbType = substr ( $ dsn , 0 , $ typeEnd ) ; $ parsed [ 'dbtype' ] = $ dbType ; $ dsn = substr ( $ dsn , $ typeEnd + 1 ) ; $ parts = explode ( ';' , $ dsn ) ; foreach ( $ parts as $ part ) { list ( $ key , $ val ) = explode ( '=' , $ part ) ; $ parsed [ $ key ] = $ val ; } return $ parsed ; }
Extract configuration variables from the DSN.

@param string $dsn
DSN to extract variables from.

@return array
Returns an array with variable names as keys with corresponding values.
Extract configuration variables from the DSN .