| 1 |
<?php |
| 2 |
namespace Aws\S3\UseArnRegion; |
| 3 |
|
| 4 |
use Aws; |
| 5 |
use Aws\S3\UseArnRegion\Exception\ConfigurationException; |
| 6 |
|
| 7 |
class Configuration implements ConfigurationInterface |
| 8 |
{ |
| 9 |
private $useArnRegion; |
| 10 |
|
| 11 |
public function __construct($useArnRegion) |
| 12 |
{ |
| 13 |
$this->useArnRegion = Aws\boolean_value($useArnRegion); |
| 14 |
if (is_null($this->useArnRegion)) { |
| 15 |
throw new ConfigurationException("'use_arn_region' config option" |
| 16 |
. " must be a boolean value."); |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
public function isUseArnRegion() |
| 24 |
{ |
| 25 |
return $this->useArnRegion; |
| 26 |
} |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
public function toArray() |
| 32 |
{ |
| 33 |
return [ |
| 34 |
'use_arn_region' => $this->isUseArnRegion(), |
| 35 |
]; |
| 36 |
} |
| 37 |
} |