本文整理汇总了PHP中Software::get_versions_by_model方法的典型用法代码示例。如果您正苦于以下问题:PHP Software::get_versions_by_model方法的具体用法?PHP Software::get_versions_by_model怎么用?PHP Software::get_versions_by_model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Software
的用法示例。
在下文中一共展示了Software::get_versions_by_model方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (count($active_plugins[$asset_id_canonical]) < 1) {
$plugin_list[$asset_id][] = array('vendor' => '', 'model' => '', 'version' => '', 'model_list' => array(), 'version_list' => array());
} else {
foreach ($active_plugins[$asset_id_canonical] as $pdata) {
$models = array();
$versions = array();
if ($pdata['vendor'] != '') {
try {
$models = Software::get_models_by_vendor($pdata['vendor']);
} catch (Exception $e) {
Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
}
}
if ($pdata['model'] != '') {
try {
$versions = Software::get_versions_by_model($pdata['vendor'] . ':' . $pdata['model']);
} catch (Exception $e) {
Av_exception::write_log(Av_exception::USER_ERROR, $e->getMessage());
}
}
$plugin_list[$asset_id][] = array('vendor' => $pdata['vendor'], 'model' => $pdata['vendor'] . ':' . $pdata['model'], 'version' => $pdata['vendor'] . ':' . $pdata['model'] . ':' . $pdata['version'], 'model_list' => $models, 'version_list' => $versions);
}
}
$device_list[$asset_id] = array("name" => $host['name'], "ips" => Asset::format_to_print($host['ips']), "plugins" => $plugin_list[$asset_id]);
}
} else {
$empty_msg = _('There are no network devices found. Return to the asset discovery step by clicking back to either discover or add network devices.');
}
/* Subtitle Texts */
$subtitle_1 = '';
$subtitle_2 = '';
示例2: get_version_list
function get_version_list($data)
{
$response = array();
$model = $data['model'];
$sensor = $data['sensor'];
ossim_valid($model, OSS_NULLABLE, OSS_ALPHA, OSS_PUNC_EXT, 'illegal:' . _("Model"));
ossim_valid($sensor, OSS_ALPHA, OSS_HEX, 'illegal:' . _("Sensor"));
check_ossim_error();
if (empty($model)) {
$items = array();
} else {
$items = Software::get_versions_by_model($model, $sensor);
}
$response['error'] = FALSE;
$response['data']['items'] = $items;
return $response;
}
示例3: foreach
/**
* EDIT MODE: No order, no search filter, and looping $plugin_data array is a based asset_id Hash
*/
$total_filtered = $total;
foreach ($plugin_data as $asset_id => $asset_plugins) {
// Apply pagination
if ($i >= $from && $i < $from + $maxrows) {
$_row_data = array();
foreach ($asset_plugins as $_pdata) {
$model_list = array();
$version_list = array();
if ($_pdata['vendor'] != '') {
$model_list = Software::get_models_by_vendor($_pdata['vendor'], $sensor_id);
}
if ($_pdata['model'] != '') {
$version_list = Software::get_versions_by_model($_pdata['vendor'] . ':' . $_pdata['model'], $sensor_id);
}
$_row_data[$asset_id][] = array('asset_id' => $asset_id, 'vendor' => $_pdata['vendor'], 'model' => $_pdata['vendor'] . ':' . $_pdata['model'], 'version' => $_pdata['vendor'] . ':' . $_pdata['model'] . ':' . $_pdata['version'], 'model_list' => json_encode($model_list), 'version_list' => json_encode($version_list));
}
$aux_data = array();
$aux_data[] = $_pdata['asset'];
$aux_data[] = '';
// Empty. Here will be located the vendor/model/version select boxes
$aux_data['DT_RowData'] = $_row_data;
//Row ID
$aux_data['DT_RowId'] = $asset_id;
$data[] = $aux_data;
}
$i++;
}
} else {