本文整理匯總了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;