Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : Configuration.php
<?php
namespace ClikIT\Infinite_Uploads\Aws\Retry;

use ClikIT\Infinite_Uploads\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(),
        ];
    }
}
© 2026 GrazzMean-Shell