private function createHostObject($backendId, $name, $state, $config, $service_states) { $OBJ = new NagVisHost($backendId, $name); $OBJ->setState($state); // The services have to know how they should handle hard/soft // states. This is a little dirty but the simplest way to do this // until the hard/soft state handling has moved from backend to the // object classes. $OBJ->setConfiguration($config); // Put state counts to the object if ($service_states !== null) { $OBJ->addStateCounts($service_states); } // Fetch summary state and output $OBJ->fetchSummariesFromCounts(); return $OBJ; }