Beispiel #1
0
 /**
  * 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 = "";
     }
 }