mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-16 10:03:01 -07:00
* Simplifies & beautifies everything * Introduces a new Class system. * Errors are defaulted to AWS's handler. * New function names & more efficient handling. * Should fix a majority of the errors. Please read the README for more!
37 lines
783 B
PHP
37 lines
783 B
PHP
<?php
|
|
namespace Aws\S3\UseArnRegion;
|
|
|
|
use Aws;
|
|
use Aws\S3\UseArnRegion\Exception\ConfigurationException;
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
{
|
|
private $useArnRegion;
|
|
|
|
public function __construct($useArnRegion)
|
|
{
|
|
$this->useArnRegion = Aws\boolean_value($useArnRegion);
|
|
if (is_null($this->useArnRegion)) {
|
|
throw new ConfigurationException("'use_arn_region' config option"
|
|
. " must be a boolean value.");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function isUseArnRegion()
|
|
{
|
|
return $this->useArnRegion;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function toArray()
|
|
{
|
|
return [
|
|
'use_arn_region' => $this->isUseArnRegion(),
|
|
];
|
|
}
|
|
}
|