roundcubemail/program/lib/Roundcube/rcube_db_mysql.php
protected function dsn_string($dsn)
    {
        $params = array();
        $result = 'mysql:';

        if ($dsn['database']) {
            $params[] = 'dbname=' . $dsn['database'];
        }

        if ($dsn['hostspec']) {
            $params[] = 'host=' . $dsn['hostspec'];
        }

        if ($dsn['port']) {
            $params[] = 'port=' . $dsn['port'];
        }

        if ($dsn['socket']) {
            $params[] = 'unix_socket=' . $dsn['socket'];
        }

        $params[] = 'charset=utf8';

        if (!empty($params)) {
            $result .= implode(';', $params);
        }

        return $result;
    }
protected function dsn_string($dsn)
    {
        $params = array();
        $result = 'mysql:';

        if ($dsn['database']) {
            $params[] = 'dbname=' . $dsn['database'];
        }

        if ($dsn['hostspec']) {
            $params[] = 'host=' . $dsn['hostspec'];
        }

        if ($dsn['port']) {
            $params[] = 'port=' . $dsn['port'];
        }

        if ($dsn['socket']) {
            $params[] = 'unix_socket=' . $dsn['socket'];
        }

        $params[] = 'charset=utf8';

        if (!empty($params)) {
            $result .= implode(';', $params);
        }

        return $result;
    }
protected function dsn_string ( $ dsn ) { $ params = array ( ) ; $ result = 'mysql:' ; if ( $ dsn [ 'database' ] ) { $ params [ ] = 'dbname=' . $ dsn [ 'database' ] ; } if ( $ dsn [ 'hostspec' ] ) { $ params [ ] = 'host=' . $ dsn [ 'hostspec' ] ; } if ( $ dsn [ 'port' ] ) { $ params [ ] = 'port=' . $ dsn [ 'port' ] ; } if ( $ dsn [ 'socket' ] ) { $ params [ ] = 'unix_socket=' . $ dsn [ 'socket' ] ; } $ params [ ] = 'charset=utf8' ; if ( ! empty ( $ params ) ) { $ result .= implode ( ';' , $ params ) ; } return $ result ; }
Returns PDO DSN string from DSN array

@param array $dsn DSN parameters

@return string Connection string
Returns PDO DSN string from DSN array