first commit -> move some files from one-api

This commit is contained in:
2026-05-06 13:37:10 +07:00
parent a3144382c5
commit 55c6ed9779
7940 changed files with 628870 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace Aws\Sts\RegionalEndpoints;
class Configuration implements ConfigurationInterface
{
private $endpointsType;
private $isFallback;
public function __construct($endpointsType, $isFallback = false)
{
$this->endpointsType = strtolower($endpointsType);
$this->isFallback = $isFallback;
if (!in_array($this->endpointsType, ['legacy', 'regional'])) {
throw new \InvalidArgumentException(
"Configuration parameter must either be 'legacy' or 'regional'."
);
}
}
/**
* {@inheritdoc}
*/
public function getEndpointsType()
{
return $this->endpointsType;
}
/**
* {@inheritdoc}
*/
public function toArray()
{
return [
'endpoints_type' => $this->getEndpointsType()
];
}
public function isFallback()
{
return $this->isFallback;
}
}