private function createFullUrl($url)
    {
        if (is_array($url)) {
            $params = $url;
            if (isset($params[0])) {
                $url = (string)$params[0];
                unset($params[0]);
            } else {
                $url = '';
            }
        }

        if (!empty($this->client->baseUrl)) {
            if (empty($url)) {
                $url = $this->client->baseUrl;
            } elseif (!preg_match('/^https?:\\/\\//i', $url)) {
                $url = rtrim($this->client->baseUrl, '/') . '/' . ltrim($url, '/');
            }
        }

        if (!empty($params)) {
            if (strpos($url, '?') === false) {
                $url .= '?';
            } else {
                $url .= '&';
            }
            $url .= http_build_query($params);
        }

        return $url;
    }
private function createFullUrl($url)
    {
        if (is_array($url)) {
            $params = $url;
            if (isset($params[0])) {
                $url = (string)$params[0];
                unset($params[0]);
            } else {
                $url = '';
            }
        }

        if (!empty($this->client->baseUrl)) {
            if (empty($url)) {
                $url = $this->client->baseUrl;
            } elseif (!preg_match('/^https?:\\/\\//i', $url)) {
                $url = rtrim($this->client->baseUrl, '/') . '/' . ltrim($url, '/');
            }
        }

        if (!empty($params)) {
            if (strpos($url, '?') === false) {
                $url .= '?';
            } else {
                $url .= '&';
            }
            $url .= http_build_query($params);
        }

        return $url;
    }
private function createFullUrl ( $ url ) { if ( is_array ( $ url ) ) { $ params = $ url ; if ( isset ( $ params [ 0 ] ) ) { $ url = ( string ) $ params [ 0 ] ; unset ( $ params [ 0 ] ) ; } else { $ url = '' ; } } if ( ! empty ( $ this -> client -> baseUrl ) ) { if ( empty ( $ url ) ) { $ url = $ this -> client -> baseUrl ; } elseif ( ! preg_match ( '/^https?:\\/\\//i' , $ url ) ) { $ url = rtrim ( $ this -> client -> baseUrl , '/' ) . '/' . ltrim ( $ url , '/' ) ; } } if ( ! empty ( $ params ) ) { if ( strpos ( $ url , '?' ) === false ) { $ url .= '?' ; } else { $ url .= '&' ; } $ url .= http_build_query ( $ params ) ; } return $ url ; }
Normalizes given URL value, filling it with actual string URL value.
@param array|string $url raw URL,
@return string full URL
Normalizes given URL value filling it with actual string URL value .