blob: d40b386d934375787cbf6ce1e735ac643abebc28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
namespace Aws\Endpoint\UseFipsEndpoint;
use Aws;
use Aws\ClientResolver;
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(),
];
}
}
|