in src/DefaultsMode/Configuration.php [23:66]
public function __construct($mode = 'legacy')
{
$mode = strtolower($mode);
if (!in_array($mode, $this->validModes)) {
throw new \InvalidArgumentException("'{$mode}' is not a valid mode."
. " The mode has to be 'legacy', 'standard', 'cross-region', 'in-region',"
. " 'mobile', or 'auto'.");
}
$this->mode = $mode;
if ($this->mode == 'legacy') {
return;
}
$data = \Aws\load_compiled_json(
__DIR__ . '/../data/sdk-default-configuration.json'
);
$this->retryMode = $data['base']['retryMode'];
$this->stsRegionalEndpoints = $data['base']['stsRegionalEndpoints'];
$this->s3UsEast1RegionalEndpoints = $data['base']['s3UsEast1RegionalEndpoints'];
$this->connectTimeoutInMillis = $data['base']['connectTimeoutInMillis'];
if (isset($data['modes'][$mode])) {
$modeData = $data['modes'][$mode];
foreach ($modeData as $settingName => $settingValue) {
if (isset($this->$settingName)) {
if (isset($settingValue['override'])) {
$this->$settingName = $settingValue['override'];
} else if (isset($settingValue['multiply'])) {
$this->$settingName *= $settingValue['multiply'];
} else if (isset($settingValue['add'])) {
$this->$settingName += $settingValue['add'];
}
} else {
if (isset($settingValue['override'])) {
if (property_exists($this, $settingName)) {
$this->$settingName = $settingValue['override'];
}
}
}
}
}
}