protected function buildCompleteUrl($root, $path, $tail = '')
{
$path = '/' . trim($path . '/' . $tail, '/');
if ($this->formatHostUsing) {
$root = call_user_func($this->formatHostUsing, $root);
}
if ($this->formatPathUsing) {
$path = call_user_func($this->formatPathUsing, $path);
}
return trim($root . $path, '/');
}