當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CTemplate::getObjects方法代碼示例

本文整理匯總了PHP中CTemplate::getObjects方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTemplate::getObjects方法的具體用法?PHP CTemplate::getObjects怎麽用?PHP CTemplate::getObjects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CTemplate的用法示例。


在下文中一共展示了CTemplate::getObjects方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: reset

    $_REQUEST['filter_snmp_oid'] = CProfile::get('web.items.filter_snmp_oid');
    $_REQUEST['filter_snmp_port'] = CProfile::get('web.items.filter_snmp_port');
    $_REQUEST['filter_value_type'] = CProfile::get('web.items.filter_value_type', -1);
    $_REQUEST['filter_data_type'] = CProfile::get('web.items.filter_data_type', -1);
    $_REQUEST['filter_delay'] = CProfile::get('web.items.filter_delay');
    $_REQUEST['filter_history'] = CProfile::get('web.items.filter_history');
    $_REQUEST['filter_trends'] = CProfile::get('web.items.filter_trends');
    $_REQUEST['filter_status'] = CProfile::get('web.items.filter_status');
    $_REQUEST['filter_templated_items'] = CProfile::get('web.items.filter_templated_items', -1);
    $_REQUEST['filter_with_triggers'] = CProfile::get('web.items.filter_with_triggers', -1);
    $_REQUEST['filter_ipmi_sensor'] = CProfile::get('web.items.filter_ipmi_sensor');
}
if (isset($_REQUEST['filter_host']) && !zbx_empty($_REQUEST['filter_host'])) {
    $hostid = CHost::getObjects(array('host' => $_REQUEST['filter_host']));
    if (empty($hostid)) {
        $hostid = CTemplate::getObjects(array('host' => $_REQUEST['filter_host']));
    }
    $hostid = reset($hostid);
    $hostid = $hostid ? $hostid['hostid'] : 0;
}
// SUBFILTERS {
$subfilters = array('subfilter_apps', 'subfilter_types', 'subfilter_value_types', 'subfilter_status', 'subfilter_templated_items', 'subfilter_with_triggers', 'subfilter_hosts', 'subfilter_interval', 'subfilter_history', 'subfilter_trends');
foreach ($subfilters as $name) {
    if (isset($_REQUEST['filter_set'])) {
        $_REQUEST[$name] = array();
    } else {
        $_REQUEST[$name] = get_request($name, array());
    }
}
// } SUBFILTERS
$result = 0;
開發者ID:songyuanjie,項目名稱:zabbix-stats,代碼行數:31,代碼來源:items.php


注:本文中的CTemplate::getObjects方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。