1<?php
2namespace Aws\S3\UseArnRegion;
3
4use Aws;
5use Aws\S3\UseArnRegion\Exception\ConfigurationException;
6
7class 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     * {@inheritdoc}
22     */
23    public function isUseArnRegion()
24    {
25        return $this->useArnRegion;
26    }
27
28    /**
29     * {@inheritdoc}
30     */
31    public function toArray()
32    {
33        return [
34            'use_arn_region' => $this->isUseArnRegion(),
35        ];
36    }
37}
38