| Server IP : 68.178.247.200 / Your IP : 216.73.216.58 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/self/cwd/wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/Retry/ |
Upload File : |
<?php
namespace Aws\Retry;
use Aws\Retry\Exception\ConfigurationException;
class Configuration implements ConfigurationInterface
{
private $mode;
private $maxAttempts;
private $validModes = [
'legacy',
'standard',
'adaptive'
];
public function __construct($mode = 'legacy', $maxAttempts = 3)
{
$mode = strtolower($mode);
if (!in_array($mode, $this->validModes)) {
throw new ConfigurationException("'{$mode}' is not a valid mode."
. " The mode has to be 'legacy', 'standard', or 'adaptive'.");
}
if (!is_numeric($maxAttempts)
|| intval($maxAttempts) != $maxAttempts
|| $maxAttempts < 1
) {
throw new ConfigurationException("The 'maxAttempts' parameter has"
. " to be an integer >= 1.");
}
$this->mode = $mode;
$this->maxAttempts = intval($maxAttempts);
}
/**
* {@inheritdoc}
*/
public function getMode()
{
return $this->mode;
}
/**
* {@inheritdoc}
*/
public function getMaxAttempts()
{
return $this->maxAttempts;
}
/**
* {@inheritdoc}
*/
public function toArray()
{
return [
'mode' => $this->getMode(),
'max_attempts' => $this->getMaxAttempts(),
];
}
}