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


PHP Cabinet::LooseSearch方法代碼示例

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


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

示例1: count

    $devList = $dev->SearchDevicebySerialNo();
    $resultcount = count($devList);
    $title = __("Serial number search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'ip') {
    $dev->PrimaryIP = $searchTerm;
    $devList = $dev->SearchDevicebyIP();
    $resultcount = count($devList);
    $title = __("PrimaryIP search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'label') {
    $dev->Label = $searchTerm;
    $devList = $dev->SearchDevicebyLabel();
    //Virtual machines will never be search via asset tags or serial numbers
    $esx->vmName = $dev->Label;
    $vmList = $esx->SearchByVMName();
    $cab->Location = $searchTerm;
    $cabList = $cab->LooseSearch(true);
    $resultcount = count($devList) + count($cabList) + count($vmList);
    $title = __("Name search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'owner') {
    $dept->Name = $searchTerm;
    if (isset($_REQUEST['deptid'])) {
        $dept->DeptID = $_REQUEST['deptid'];
        $dept->GetDeptByID();
    } else {
        $dept->GetDeptByName();
    }
    $dev->Owner = $dept->DeptID;
    $devList = $dev->GetDevicesbyOwner();
    $esx->Owner = $dept->DeptID;
    $vmList = $esx->GetVMListbyOwner();
    $cab->AssignedTo = $dept->DeptID;
開發者ID:rhizalpatrax64bit,項目名稱:openDCIM,代碼行數:31,代碼來源:search.php


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