+
+ private function extractNames($sNames)
+ {
+ if (!$sNames) {
+ return (object) array();
+ }
+
+ $aFullNames = json_decode($sNames, true);
+ $aNames = array();
+
+ foreach ($aFullNames as $sKey => $sValue) {
+ if (strpos($sKey, '_place_') === 0) {
+ $sSubKey = substr($sKey, 7);
+ if (array_key_exists($sSubKey, $aFullNames)) {
+ $aNames[$sKey] = $sValue;
+ } else {
+ $aNames[$sSubKey] = $sValue;
+ }
+ } else {
+ $aNames[$sKey] = $sValue;
+ }
+ }
+
+ return $aNames;
+ }
+
+