PHP 7.4.33
Preview: Configuration.php Size: 1.12 KB
/home/godevadmin/www/admin/vendor/aws/Aws/EndpointDiscovery/Configuration.php

<?php
namespace Aws\EndpointDiscovery;

class Configuration implements ConfigurationInterface
{
    private $cacheLimit;
    private $enabled;

    public function __construct($enabled, $cacheLimit = 1000)
    {
        $this->cacheLimit = filter_var($cacheLimit, FILTER_VALIDATE_INT);
        if ($this->cacheLimit == false || $this->cacheLimit < 1) {
            throw new \InvalidArgumentException(
                "'cache_limit' value must be a positive integer."
            );
        }

        // Unparsable $enabled flag errs on the side of disabling endpoint discovery
        $this->enabled = filter_var($enabled, FILTER_VALIDATE_BOOLEAN);
    }

    /**
     * {@inheritdoc}
     */
    public function isEnabled()
    {
        return $this->enabled;
    }

    /**
     * {@inheritdoc}
     */
    public function getCacheLimit()
    {
        return $this->cacheLimit;
    }

    /**
     * {@inheritdoc}
     */
    public function toArray()
    {
        return [
            'enabled' => $this->isEnabled(),
            'cache_limit' => $this->getCacheLimit()
        ];
    }
}

Directory Contents

Dirs: 1 × Files: 5

Name Size Perms Modified Actions
Exception DIR
- drwxrwxr-x 2024-06-18 20:10:16
Edit Download
1.12 KB lrwxrwxr-x 2024-06-18 20:10:16
Edit Download
610 B lrwxrwxr-x 2024-06-18 20:10:16
Edit Download
8.87 KB lrwxrwxr-x 2024-06-18 20:10:16
Edit Download
13.70 KB lrwxrwxr-x 2024-06-18 20:10:16
Edit Download
1.98 KB lrwxrwxr-x 2024-06-18 20:10:16
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).