public function __construct($config = null)
{
$this->getRegionUrls();
if (!is_null($config)) {
if (is_array($config)) {
$configArray = $config;
} elseif (!is_array($config)) {
$configArray = $this->checkIfFileExists($config);
}
if (is_array($configArray)) {
$this->checkConfigKeys($configArray);
} else {
throw new \Exception('$config is of the incorrect type ' . gettype($configArray) . ' and should be of the type array');
}
} else {
throw new \Exception('$config cannot be null.');
}
}