Matt C.
Well-known member
I'm making a battle.net integration add-on, and I need to be able to distinguish between different regions via the options.
I was wondering if there was a better way do it than this?
Thank you!
I was wondering if there was a better way do it than this?
Code:
$this->options = \XF::options();
if ($this->options->ah_bn_region == 'us')
{
$url = 'https://us.battle.net';
}
elseif ($this->options->ah_bn_region == 'eu')
{
$url = 'https://eu.battle.net';
}
else
{
$url = 'https://apac.battle.net';
}
if (null === $baseApiUri) {
$this->baseApiUri = new Uri($url);
}
Thank you!