public function searchDestination($mro) { try { //echo 'LMwebSoapClient searchDestination'; $result = $this->sc->searchDestinations(array('mro' => $mro->getParamsAsArray()))->return; } catch (Exception $ex) { echo $ex->getMessage(); return null; } if ($result->destinations->info == "NOHIT") { Template::errorTemplate("Keine Treffer gefunden"); return null; } $regionList = array(); if (is_array($result->destinations->regionList)) { foreach ($result->destinations->regionList as $value) { $region = new Region(); $region->setParamsByArray($value); array_push($regionList, $region); } } else { $region = new Region(); $region->setParamsByArray($result->destinations->regionList); array_push($regionList, $region); } return $regionList; }