//Handle other components from MongoDB... foreach ($common_params['components'] as $component) { //skip fw_core, as it hase been already handled... if ($component == "fw_core") { continue; } foreach (array_keys($json_struct["pois"]) as $uuid) { // print $uuid; $comp_data = getComponentMongoDB($mongodb, $component, $uuid, false); if ($comp_data != NULL) { $json_struct["pois"][$uuid][$component] = $comp_data; } } } // additional pois and fields from context broker $pois_from_cb = cb_get_pois(['north' => $north, 'south' => $south, 'east' => $east, 'west' => $west]); $extra_json_struct = ['pois' => []]; foreach ($common_params['components'] as $component) { foreach ($pois_from_cb as $uuid => $data) { if (array_key_exists($component, $data)) { if ($component == 'fw_core') { foreach ($data['fw_core'] as $subkey => $subdata) { $json_struct['pois'][$uuid]['fw_core'][$subkey] = $subdata; } } else { $json_struct['pois'][$uuid][$component] = $data[$component]; } } } } //Language filtering
//Handle other components from MongoDB... foreach ($common_params['components'] as $component) { //skip fw_core, as it hase been already handled... if ($component == "fw_core") { continue; } foreach (array_keys($json_struct["pois"]) as $uuid) { // print $uuid; $comp_data = getComponentMongoDB($mongodb, $component, $uuid, false); if ($comp_data != NULL) { $json_struct["pois"][$uuid][$component] = $comp_data; } } } // additional pois and fields from context broker $pois_from_cb = cb_get_pois(['lat' => $lat, 'lon' => $lon, 'rad' => $radius]); $extra_json_struct = ['pois' => []]; foreach ($common_params['components'] as $component) { foreach ($pois_from_cb as $uuid => $data) { if (array_key_exists($component, $data)) { if ($component == 'fw_core') { foreach ($data['fw_core'] as $subkey => $subdata) { $json_struct['pois'][$uuid]['fw_core'][$subkey] = $subdata; } } else { $json_struct['pois'][$uuid][$component] = $data[$component]; } } } } //Language filtering