summaryrefslogtreecommitdiff
path: root/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php')
-rw-r--r--vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php b/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php
new file mode 100644
index 0000000..48dc63d
--- /dev/null
+++ b/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Configuration.php
@@ -0,0 +1,42 @@
+<?php
+namespace Aws\S3\RegionalEndpoint;
+
+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;
+ }
+}