| @@ 791-802 (lines=12) @@ | ||
| 788 | * |
|
| 789 | * @return void |
|
| 790 | */ |
|
| 791 | public function setRegion($value) |
|
| 792 | { |
|
| 793 | if (!is_string($value)) { |
|
| 794 | throw new MapperArgumentException('Invalid map region.'); |
|
| 795 | } |
|
| 796 | ||
| 797 | if (!in_array($value, $this->regions)) { |
|
| 798 | throw new MapperArgumentException('Region is required in ISO 3166-1 code format.'); |
|
| 799 | } |
|
| 800 | ||
| 801 | $this->region = $value; |
|
| 802 | } |
|
| 803 | ||
| 804 | /** |
|
| 805 | * Get the Google Maps region. |
|
| @@ 823-834 (lines=12) @@ | ||
| 820 | * |
|
| 821 | * @return void |
|
| 822 | */ |
|
| 823 | public function setLanguage($value) |
|
| 824 | { |
|
| 825 | if (!is_string($value)) { |
|
| 826 | throw new MapperArgumentException('Invalid map language.'); |
|
| 827 | } |
|
| 828 | ||
| 829 | if (!in_array($value, $this->languages)) { |
|
| 830 | throw new MapperArgumentException('Language is required in ISO 639-1 code format.'); |
|
| 831 | } |
|
| 832 | ||
| 833 | $this->language = $value; |
|
| 834 | } |
|
| 835 | ||
| 836 | /** |
|
| 837 | * Get the Google Maps language. |
|