本文整理汇总了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;