1 | <?php |
||
15 | class Region |
||
16 | { |
||
17 | private $possibleOptions = [ |
||
18 | // US |
||
19 | "us-east-1", |
||
20 | "us-east-2", |
||
21 | "us-west-1", |
||
22 | "us-west-2", |
||
23 | // Africa |
||
24 | "af-south-1", |
||
25 | // Asia-Pacific |
||
26 | "ap-east-1", |
||
27 | "ap-south-1", |
||
28 | "ap-northeast-1", |
||
29 | "ap-northeast-2", |
||
30 | "ap-northeast-3", |
||
31 | "ap-southeast-1", |
||
32 | "ap-southeast-2", |
||
33 | // Canada |
||
34 | "ca-central-1", |
||
35 | // China |
||
36 | "cn-north-1", |
||
37 | "cn-northwest-1", |
||
38 | // EU |
||
39 | "eu-central-1", |
||
40 | "eu-west-1", |
||
41 | "eu-west-2", |
||
42 | "eu-west-3", |
||
43 | "eu-north-1", |
||
44 | "eu-south-1", |
||
45 | // Other |
||
46 | "sa-east-1", |
||
47 | "me-south-1", |
||
48 | ]; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | private $name; |
||
54 | |||
55 | public function __construct(string $region) |
||
59 | |||
60 | /** |
||
61 | * @return string the aws region. |
||
62 | */ |
||
63 | public function __toString() |
||
67 | |||
68 | /** |
||
69 | * @param string $region the aws region. |
||
70 | * |
||
71 | * @throws InvalidRegionException |
||
72 | */ |
||
73 | public function setName(string $region): void |
||
81 | |||
82 | /** |
||
83 | * @return string the aws region. |
||
84 | */ |
||
85 | public function getName(): string |
||
89 | } |
||
90 |