src/ClientBase.php
function build_url($resource, array $query = array()) {
        $url = $this->getEndpoint();
        if ($resource && $this->spaceId) $url .= '/';
        if ($resource) $url .= $resource;
        if (!empty($query)) $url .= '?' . http_build_query($query);
        return $url;
    }
function build_url($resource, array $query = array()) {
        $url = $this->getEndpoint();
        if ($resource && $this->spaceId) $url .= '/';
        if ($resource) $url .= $resource;
        if (!empty($query)) $url .= '?' . http_build_query($query);
        return $url;
    }
function build_url ( $ resource , array $ query = array ( ) ) { $ url = $ this -> getEndpoint ( ) ; if ( $ resource && $ this -> spaceId ) $ url .= '/' ; if ( $ resource ) $ url .= $ resource ; if ( ! empty ( $ query ) ) $ url .= '?' . http_build_query ( $ query ) ; return $ url ; }
Build the query URL.
@param $resource
@param $query
@return string
Build the query URL .