src/Request/Http/HttpRequest.php
public static function buildUrl(array $parts)
    {
        $scheme = isset($parts['scheme']) ? $parts['scheme'] . '://' : '';
        $host = isset($parts['host']) ? $parts['host'] : '';
        $port = isset($parts['port']) ? ':' . $parts['port'] : '';
        $user = isset($parts['user']) ? $parts['user'] : '';
        $pass = isset($parts['pass']) ? ':' . $parts['pass'] : '';
        $pass = ($user || $pass) ? "$pass@" : '';
        $path = isset($parts['path']) ? $parts['path'] : '';
        $query = isset($parts['query']) ? '?' . $parts['query'] : '';
        $fragment = isset($parts['fragment']) ? '#' . $parts['fragment'] : '';
        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }
public static function buildUrl(array $parts)
    {
        $scheme = isset($parts['scheme']) ? $parts['scheme'] . '://' : '';
        $host = isset($parts['host']) ? $parts['host'] : '';
        $port = isset($parts['port']) ? ':' . $parts['port'] : '';
        $user = isset($parts['user']) ? $parts['user'] : '';
        $pass = isset($parts['pass']) ? ':' . $parts['pass'] : '';
        $pass = ($user || $pass) ? "$pass@" : '';
        $path = isset($parts['path']) ? $parts['path'] : '';
        $query = isset($parts['query']) ? '?' . $parts['query'] : '';
        $fragment = isset($parts['fragment']) ? '#' . $parts['fragment'] : '';
        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }
public static function buildUrl ( array $ parts ) { $ scheme = isset ( $ parts [ 'scheme' ] ) ? $ parts [ 'scheme' ] . '://' : '' ; $ host = isset ( $ parts [ 'host' ] ) ? $ parts [ 'host' ] : '' ; $ port = isset ( $ parts [ 'port' ] ) ? ':' . $ parts [ 'port' ] : '' ; $ user = isset ( $ parts [ 'user' ] ) ? $ parts [ 'user' ] : '' ; $ pass = isset ( $ parts [ 'pass' ] ) ? ':' . $ parts [ 'pass' ] : '' ; $ pass = ( $ user || $ pass ) ? "$pass@" : '' ; $ path = isset ( $ parts [ 'path' ] ) ? $ parts [ 'path' ] : '' ; $ query = isset ( $ parts [ 'query' ] ) ? '?' . $ parts [ 'query' ] : '' ; $ fragment = isset ( $ parts [ 'fragment' ] ) ? '#' . $ parts [ 'fragment' ] : '' ; return $ scheme . $ user . $ pass . $ host . $ port . $ path . $ query . $ fragment ; }
Builds a url based on given parts.

@see http://php.net/manual/en/function.parse-url.php
@param array $parts part(s) of an URL in form of a string or associative array like parseUrl() returns.
@return string
Builds a url based on given parts .