예제 #1
0
 /**
  * Set API region
  *
  * Available regions are "CN" and "US".
  *
  * @param string $region
  */
 public static function useRegion($region)
 {
     if (!isset(self::$api[$region])) {
         throw new \RuntimeException("Invalid API region: {$region}.");
     }
     self::$apiRegion = $region;
 }
예제 #2
0
 /**
  * Set API region
  *
  * Available regions are "CN" and "US".
  * @param  string $region
  * @return void
  */
 public static function useRegion($region)
 {
     if (!isset(self::$api[$region])) {
         throw new \ErrorException("Invalid API region: " . $region);
     }
     self::$apiRegion = $region;
 }