@@ 781-792 (lines=12) @@ | ||
778 | * |
|
779 | * @return void |
|
780 | */ |
|
781 | public function setRegion($value) |
|
782 | { |
|
783 | if (!is_string($value)) { |
|
784 | throw new MapperArgumentException('Invalid map region.'); |
|
785 | } |
|
786 | ||
787 | if (!in_array($value, $this->regions)) { |
|
788 | throw new MapperArgumentException('Region is required in ISO 3166-1 code format.'); |
|
789 | } |
|
790 | ||
791 | $this->region = $value; |
|
792 | } |
|
793 | ||
794 | /** |
|
795 | * Get the Google Maps region. |
|
@@ 813-824 (lines=12) @@ | ||
810 | * |
|
811 | * @return void |
|
812 | */ |
|
813 | public function setLanguage($value) |
|
814 | { |
|
815 | if (!is_string($value)) { |
|
816 | throw new MapperArgumentException('Invalid map language.'); |
|
817 | } |
|
818 | ||
819 | if (!in_array($value, $this->languages)) { |
|
820 | throw new MapperArgumentException('Language is required in ISO 639-1 code format.'); |
|
821 | } |
|
822 | ||
823 | $this->language = $value; |
|
824 | } |
|
825 | ||
826 | /** |
|
827 | * Get the Google Maps language. |