private function createFullUrl($url)
{
if (is_array($url)) {
$params = $url;
if (isset($params[0])) {
$url = $params[0];
unset($params[0]);
}
if (!empty($params)) {
if (strpos($url, '?') === false) {
$url .= '?';
} else {
$url .= '&';
}
$url .= http_build_query($params);
}
}
if (!empty($this->client->baseUrl)) {
if (!preg_match('/^https?:\\/\\//i', $url)) {
$url = $this->client->baseUrl . '/' . $url;
}
}
return $url;
}