mirror of
https://gh.wpcy.net/https://github.com/pixelabs-wp/whitelabel-plugins-update-server.git
synced 2026-04-18 04:02:15 +08:00
37 lines
831 B
PHP
37 lines
831 B
PHP
<?php
|
|
namespace Aws\Endpoint\UseFipsEndpoint;
|
|
|
|
use Aws;
|
|
use Aws\Endpoint\UseFipsEndpoint\Exception\ConfigurationException;
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
{
|
|
private $useFipsEndpoint;
|
|
|
|
public function __construct($useFipsEndpoint)
|
|
{
|
|
$this->useFipsEndpoint = Aws\boolean_value($useFipsEndpoint);
|
|
if (is_null($this->useFipsEndpoint)) {
|
|
throw new ConfigurationException("'use_fips_endpoint' config option"
|
|
. " must be a boolean value.");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function isUseFipsEndpoint()
|
|
{
|
|
return $this->useFipsEndpoint;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function toArray()
|
|
{
|
|
return [
|
|
'use_fips_endpoint' => $this->isUseFipsEndpoint(),
|
|
];
|
|
}
|
|
}
|