/** * 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; }
/** * 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; }