OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
knoblyExpressLandingPage
/
vendor
/
aws
/
aws-sdk-php
/
src
/
Retry
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/21/2024 10:05:25 AM
rwxr-xr-x
📄
Configuration.php
1.42 KB
08/21/2024 10:03:37 AM
rw-r--r--
📄
ConfigurationInterface.php
617 bytes
08/21/2024 10:03:37 AM
rw-r--r--
📄
ConfigurationProvider.php
7.97 KB
08/21/2024 10:03:37 AM
rw-r--r--
📁
Exception
-
08/21/2024 10:05:22 AM
rwxr-xr-x
📄
QuotaManager.php
2.59 KB
08/21/2024 10:03:37 AM
rw-r--r--
📄
RateLimiter.php
5.2 KB
08/21/2024 10:03:37 AM
rw-r--r--
📄
RetryHelperTrait.php
1.57 KB
08/21/2024 10:03:37 AM
rw-r--r--
Editing: Configuration.php
Close
<?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(), ]; } }