本文整理匯總了PHP中Asset_host::set_icon方法的典型用法代碼示例。如果您正苦於以下問題:PHP Asset_host::set_icon方法的具體用法?PHP Asset_host::set_icon怎麽用?PHP Asset_host::set_icon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Asset_host
的用法示例。
在下文中一共展示了Asset_host::set_icon方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
$can_i_create_assets = Session::can_i_create_assets();
}
if ($can_i_create_assets == TRUE) {
$host->set_ctx($ctx);
$host->set_name($name);
if ($can_i_modify_ips == TRUE) {
if (is_array($aux_ips) && !empty($aux_ips)) {
foreach ($aux_ips as $ip) {
$ips[$ip] = array('ip' => $ip, 'mac' => NULL);
}
$host->set_ips($ips);
}
}
$host->set_descr($descr);
if ($icon != '') {
$host->set_icon($icon);
}
$host->set_fqdns($fqdns);
$host->set_external($external);
$host->set_location($latitude, $longitude, $zoom);
$host->set_asset_value($asset_value);
$host->set_threshold_c($threshold_c);
$host->set_threshold_a($threshold_a);
$host->set_devices($devices);
$host->set_sensors($sensors);
$host->save_in_db($conn);
Asset_host_scan::delete_plugin_from_db($conn, $id, 2007);
if (!empty($nagios)) {
Asset_host_scan::save_plugin_in_db($conn, $id, 2007);
}
$data['status'] = 'OK';
示例2: foreach
}
if ($can_i_create_assets == TRUE) {
$host->set_ctx($ctx);
$host->set_name($name);
if ($can_i_modify_ips == TRUE) {
if (is_array($aux_ips) && !empty($aux_ips)) {
foreach ($aux_ips as $ip) {
$mac = !empty($old_ips[$ip]['mac']) ? $old_ips[$ip]['mac'] : NULL;
$ips[$ip] = array('ip' => $ip, 'mac' => $mac);
}
$host->set_ips($ips);
}
}
$host->set_descr($descr);
if ($icon != '') {
$host->set_icon($icon);
} else {
if ($is_in_db == TRUE && empty($h_icon)) {
$host->set_icon(NULL);
}
}
$host->set_fqdns($fqdns);
$host->set_external($external);
$host->set_location($latitude, $longitude, $zoom);
$host->set_asset_value($asset_value);
$os_data = array("value" => $os, "source" => array("id" => 1));
$host->set_os($os_data);
$host->set_model($model);
$host->set_devices($devices);
$host->set_sensors($sensors);
$host->save_in_db($conn);