src/MVQN/REST/RestClient.php
public static function setBaseUrl(string $url = ""): string
    {
        // IF no URL has been specified...
        if($url === "" || $url === null)
        {
            // AND the current URL is not set...
            if (self::$_baseUrl === "")
                // ... Throw an exception!
                throw new \Exception("[MVQN\REST\ResClient] ".
                    "'baseUrl' must be set by RestClient::baseUrl() before calling any RestClient methods!");
        }
        else
        {
            // OTHERWISE set the URL to that which was specified here.
            self::$_baseUrl = $url;
            self::client(true);
        }

        // Finally, return the URL, which should NEVER be empty at this point!
        return self::$_baseUrl;
    }
public static function setBaseUrl(string $url = ""): string
    {
        // IF no URL has been specified...
        if($url === "" || $url === null)
        {
            // AND the current URL is not set...
            if (self::$_baseUrl === "")
                // ... Throw an exception!
                throw new \Exception("[MVQN\REST\ResClient] ".
                    "'baseUrl' must be set by RestClient::baseUrl() before calling any RestClient methods!");
        }
        else
        {
            // OTHERWISE set the URL to that which was specified here.
            self::$_baseUrl = $url;
            self::client(true);
        }

        // Finally, return the URL, which should NEVER be empty at this point!
        return self::$_baseUrl;
    }
Gets or sets the base URL to be used with all REST calls.

@param string $url The base URL for which to prefix all REST calls.
@return string Returns the base URL that is currently set.
@throws \Exception Throws an exception if the base URL is not set and none has been provided.