本文整理汇总了PHP中NetworkPort::getUniqueObjectIDByFQDN方法的典型用法代码示例。如果您正苦于以下问题:PHP NetworkPort::getUniqueObjectIDByFQDN方法的具体用法?PHP NetworkPort::getUniqueObjectIDByFQDN怎么用?PHP NetworkPort::getUniqueObjectIDByFQDN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkPort
的用法示例。
在下文中一共展示了NetworkPort::getUniqueObjectIDByFQDN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeActions
function executeActions($output, $params)
{
if (count($this->actions)) {
foreach ($this->actions as $action) {
switch ($action->fields["action_type"]) {
case "send":
$ticket = new Ticket();
if ($ticket->getFromDB($output['id'])) {
NotificationEvent::raiseEvent('recall', $ticket);
}
break;
case "add_validation":
$output['_add_validation'] = $action->fields["value"];
break;
case "assign":
$output[$action->fields["field"]] = $action->fields["value"];
break;
case 'compute':
// Value could be not set (from test)
$urgency = isset($output['urgency']) ? $output['urgency'] : 3;
$impact = isset($output['impact']) ? $output['impact'] : 3;
// Apply priority_matrix from config
$output['priority'] = Ticket::computePriority($urgency, $impact);
break;
case "affectbyip":
case "affectbyfqdn":
case "affectbymac":
if (!isset($output["entities_id"])) {
$output["entities_id"] = $params["entities_id"];
}
if (isset($this->regex_results[0])) {
$regexvalue = RuleAction::getRegexResultById($action->fields["value"], $this->regex_results[0]);
} else {
$regexvalue = $action->fields["value"];
}
switch ($action->fields["action_type"]) {
case "affectbyip":
$result = NetworkPort::getUniqueObjectIDByIPAddressOrMac($regexvalue, "IP", $output["entities_id"]);
break;
case "affectbyfqdn":
$result = NetworkPort::getUniqueObjectIDByFQDN($regexvalue, $output["entities_id"]);
break;
case "affectbymac":
$result = NetworkPort::getUniqueObjectIDByIPAddressOrMac($regexvalue, "MAC", $output["entities_id"]);
break;
default:
$result = array();
}
if (!empty($result)) {
$output["itemtype"] = $result["itemtype"];
$output["items_id"] = $result["id"];
}
break;
}
}
}
return $output;
}