@@ 856-867 (lines=12) @@ | ||
853 | * |
|
854 | * @return void |
|
855 | */ |
|
856 | public function setRegion($value) |
|
857 | { |
|
858 | if (!is_string($value)) { |
|
859 | throw new MapperArgumentException('Invalid map region.'); |
|
860 | } |
|
861 | ||
862 | if (!in_array($value, $this->regions)) { |
|
863 | throw new MapperArgumentException('Region is required in ISO 3166-1 code format.'); |
|
864 | } |
|
865 | ||
866 | $this->region = $value; |
|
867 | } |
|
868 | ||
869 | /** |
|
870 | * Get the Google Maps region. |
|
@@ 888-899 (lines=12) @@ | ||
885 | * |
|
886 | * @return void |
|
887 | */ |
|
888 | public function setLanguage($value) |
|
889 | { |
|
890 | if (!is_string($value)) { |
|
891 | throw new MapperArgumentException('Invalid map language.'); |
|
892 | } |
|
893 | ||
894 | if (!in_array($value, $this->languages)) { |
|
895 | throw new MapperArgumentException('Language is required in ISO 639-1 code format.'); |
|
896 | } |
|
897 | ||
898 | $this->language = $value; |
|
899 | } |
|
900 | ||
901 | /** |
|
902 | * Get the Google Maps language. |