/** * ParseClient::setServerURL, to change the Parse Server address for this app * * @param string $serverURL The remote server and mount path * * @throws \Exception */ public static function setServerURL($serverURL) { if (!$serverURL) { throw new Exception('Invalid Server URL.'); } self::$serverURL = $serverURL; }
/** * ParseClient::setServerURL, to change the Parse Server address & mount path for this app * @param string $serverUrl The remote server url * @param string $mountPath The mount path for this server * * @throws \Exception * */ public static function setServerURL($serverURL, $mountPath) { if (!$serverURL) { throw new Exception('Invalid Server URL.'); } if (!$mountPath) { throw new Exception('Invalid Mount Path.'); } self::$serverURL = rtrim($serverURL, '/'); self::$mountPath = trim($mountPath, '/') . '/'; }
/** * ParseClient::setServerURL, to change the Parse Server address & mount path for this app * @param string $serverUrl The remote server url * @param string $mountPath The mount path for this server * * @throws \Exception * */ public static function setServerURL($serverURL, $mountPath) { if (!$serverURL) { throw new Exception('Invalid Server URL.'); } if (!$mountPath) { throw new Exception('Invalid Mount Path.'); } self::$serverURL = rtrim($serverURL, '/'); self::$mountPath = trim($mountPath, '/') . '/'; // check if mount path is root if (self::$mountPath == "/") { // root path should have no mount path self::$mountPath = ""; } }