code/libraries/joomlatools/library/http/url/url.php
public static function fromTemplate($template, array $variables)
    {
        if (strpos($template, '{') !== false) {
            $url = uri_template($template, $variables);
        } else {
            $url = $template;
        }

        return self::fromString($url);
    }
public static function fromTemplate($template, array $variables)
    {
        if (strpos($template, '{') !== false) {
            $url = uri_template($template, $variables);
        } else {
            $url = $template;
        }

        return self::fromString($url);
    }
public static function fromTemplate ( $ template , array $ variables ) { if ( strpos ( $ template , '{' ) !== false ) { $ url = uri_template ( $ template , $ variables ) ; } else { $ url = $ template ; } return self :: fromString ( $ url ) ; }
Build the url from a template

@link http://tools.ietf.org/html/rfc6570

@param string $template  URI template
@param array  $variables Template variables
Build the url from a template