| @@ 801-812 (lines=12) @@ | ||
| 798 | * |
|
| 799 | * @return void |
|
| 800 | */ |
|
| 801 | public function setRegion($value) |
|
| 802 | { |
|
| 803 | if (!is_string($value)) { |
|
| 804 | throw new MapperArgumentException('Invalid map region.'); |
|
| 805 | } |
|
| 806 | ||
| 807 | if (!in_array($value, $this->regions)) { |
|
| 808 | throw new MapperArgumentException('Region is required in ISO 3166-1 code format.'); |
|
| 809 | } |
|
| 810 | ||
| 811 | $this->region = $value; |
|
| 812 | } |
|
| 813 | ||
| 814 | /** |
|
| 815 | * Get the Google Maps region. |
|
| @@ 833-844 (lines=12) @@ | ||
| 830 | * |
|
| 831 | * @return void |
|
| 832 | */ |
|
| 833 | public function setLanguage($value) |
|
| 834 | { |
|
| 835 | if (!is_string($value)) { |
|
| 836 | throw new MapperArgumentException('Invalid map language.'); |
|
| 837 | } |
|
| 838 | ||
| 839 | if (!in_array($value, $this->languages)) { |
|
| 840 | throw new MapperArgumentException('Language is required in ISO 639-1 code format.'); |
|
| 841 | } |
|
| 842 | ||
| 843 | $this->language = $value; |
|
| 844 | } |
|
| 845 | ||
| 846 | /** |
|
| 847 | * Get the Google Maps language. |
|