+
+ private function addSubdivisionCode(&$aAddress, $iAdminLevel, $nameDetails)
+ {
+ if (is_string($nameDetails)) {
+ $nameDetails = json_decode('{' . str_replace('"=>"', '":"', $nameDetails) . '}', true);
+ }
+ if (!empty($nameDetails['ISO3166-2'])) {
+ $aAddress["ISO3166-2-lvl$iAdminLevel"] = $nameDetails['ISO3166-2'];
+ }
+ }