当前位置: 首页>>代码示例>>PHP>>正文


PHP getNodeIdByNodeName函数代码示例

本文整理汇总了PHP中getNodeIdByNodeName函数的典型用法代码示例。如果您正苦于以下问题:PHP getNodeIdByNodeName函数的具体用法?PHP getNodeIdByNodeName怎么用?PHP getNodeIdByNodeName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getNodeIdByNodeName函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exists

 public function exists($object)
 {
     $keyFields = array(array('dserviceid'));
     $options = array('filter' => zbx_array_mintersect($keyFields, $object), 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => 1, 'limit' => 1);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $objs = $this->get($options);
     return !empty($objs);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:12,代码来源:CDService.php

示例2: exists

 public function exists($object)
 {
     $options = array('filter' => array('name' => $object['name']), 'output' => array('usrgrpid'), 'nopermissions' => 1, 'limit' => 1);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $objs = $this->get($options);
     return !empty($objs);
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:11,代码来源:CUserGroup.php

示例3: exists

 public function exists(array $object)
 {
     $options = array('filter' => array(), 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => 1, 'limit' => 1);
     if (isset($object['name'])) {
         $options['filter']['name'] = $object['name'];
     }
     if (isset($object['hostids'])) {
         $options['druleids'] = zbx_toArray($object['druleids']);
     }
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $objs = $this->get($options);
     return !empty($objs);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:17,代码来源:CDRule.php

示例4: exists

 /**
  * Check if item exists.
  *
  * @param array $object
  *
  * @return bool
  */
 public function exists(array $object)
 {
     $options = array('filter' => array('key_' => $object['key_']), 'webitems' => true, 'output' => array('itemid'), 'nopermissions' => true, 'limit' => 1);
     if (isset($object['hostid'])) {
         $options['hostids'] = $object['hostid'];
     }
     if (isset($object['host'])) {
         $options['filter']['host'] = $object['host'];
     }
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $objs = $this->get($options);
     return !empty($objs);
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:24,代码来源:CItem.php

示例5: exists

 /**
  * Is interface exist.
  *
  * @param array $object
  *
  * @return bool
  */
 public function exists(array $object)
 {
     $keyFields = array('interfaceid', 'hostid', 'ip', 'dns');
     $options = array('filter' => zbx_array_mintersect($keyFields, $object), 'output' => array('interfaceid'), 'nopermissions' => true, 'limit' => 1);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $objs = $this->get($options);
     return !empty($objs);
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:19,代码来源:CHostInterface.php

示例6: exists

 /**
  * @param $object
  *
  * @return bool
  */
 public function exists(array $object)
 {
     $keyFields = array(array('hostid', 'host'), 'description');
     $result = false;
     if (!isset($object['hostid']) && !isset($object['host'])) {
         $expressionData = new CTriggerExpression();
         if (!$expressionData->parse($object['expression'])) {
             return false;
         }
         $expressionHosts = $expressionData->getHosts();
         $object['host'] = reset($expressionHosts);
     }
     $options = array('filter' => array_merge(zbx_array_mintersect($keyFields, $object), array('flags' => null)), 'output' => API_OUTPUT_EXTEND, 'nopermissions' => true);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } elseif (isset($object['nodeids'])) {
         $options['nodeids'] = $object['nodeids'];
     }
     $triggers = $this->get($options);
     foreach ($triggers as $trigger) {
         $tmpExp = explode_exp($trigger['expression']);
         if (strcmp($tmpExp, $object['expression']) == 0) {
             $result = true;
             break;
         }
     }
     return $result;
 }
开发者ID:itnihao,项目名称:Zabbix_,代码行数:33,代码来源:CTrigger.php

示例7: exists

 public function exists($data)
 {
     $keyFields = array(array('screenid', 'name'), 'templateid');
     $options = array('filter' => zbx_array_mintersect($keyFields, $data), 'preservekeys' => true, 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => true, 'limit' => 1);
     if (isset($data['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($data['node']);
     } elseif (isset($data['nodeids'])) {
         $options['nodeids'] = $data['nodeids'];
     }
     $screens = $this->get($options);
     return !empty($screens);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:12,代码来源:CTemplateScreen.php

示例8: exists

 public static function exists($object)
 {
     $keyFields = array('name', 'groupid');
     $options = array('filter' => zbx_array_mintersect($keyFields, $object), 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => 1, 'limit' => 1);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } else {
         if (isset($object['nodeids'])) {
             $options['nodeids'] = $object['nodeids'];
         }
     }
     $objs = self::get($options);
     return !empty($objs);
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:14,代码来源:class.chostgroup.php

示例9: getObjects

 /**
  * Get graphid by graph name.
  *
  * params: hostids, name
  *
  * @param array $graphData
  *
  * @return array
  */
 public function getObjects($graphData)
 {
     $options = array('filter' => $graphData, 'output' => API_OUTPUT_EXTEND);
     if (isset($graphData['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($graphData['node']);
     } elseif (isset($graphData['nodeids'])) {
         $options['nodeids'] = $graphData['nodeids'];
     }
     return $this->get($options);
 }
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:19,代码来源:CGraphGeneral.php

示例10: exists

 public static function exists($object)
 {
     $options = array('filter' => array('key_' => $object['key_']), 'webitems' => 1, 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => 1, 'limit' => 1);
     if (isset($object['hostid'])) {
         $options['hostids'] = $object['hostid'];
     }
     if (isset($object['host'])) {
         $options['filter']['host'] = $object['host'];
     }
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } else {
         if (isset($object['nodeids'])) {
             $options['nodeids'] = $object['nodeids'];
         }
     }
     $objs = self::get($options);
     return !empty($objs);
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:19,代码来源:class.citem.php

示例11: exists

 public static function exists($data)
 {
     $keyFields = array(array('screenid', 'name'));
     $options = array('filter' => zbx_array_mintersect($keyFields, $data), 'output' => API_OUTPUT_SHORTEN, 'nopermissions' => 1, 'limit' => 1);
     if (isset($data['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($data['node']);
     } else {
         if (isset($data['nodeids'])) {
             $options['nodeids'] = $data['nodeids'];
         }
     }
     $sysmaps = self::get($options);
     return !empty($sysmaps);
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:14,代码来源:class.cscreen.php

示例12: exists

 public static function exists($object)
 {
     $keyFields = array(array('hostid', 'host'), 'description');
     $result = false;
     if (!isset($object['hostid']) && !isset($object['host'])) {
         $expr = new CTriggerExpression($object);
         $expression = $object['expression'];
         if (!empty($expr->errors)) {
             return false;
         }
         if (empty($expr->data['hosts'])) {
             return false;
         }
         $object['host'] = reset($expr->data['hosts']);
     }
     $options = array('filter' => zbx_array_mintersect($keyFields, $object), 'output' => API_OUTPUT_EXTEND, 'nopermissions' => 1);
     if (isset($object['node'])) {
         $options['nodeids'] = getNodeIdByNodeName($object['node']);
     } else {
         if (isset($object['nodeids'])) {
             $options['nodeids'] = $object['nodeids'];
         }
     }
     $triggers = self::get($options);
     foreach ($triggers as $tnum => $trigger) {
         $tmp_exp = explode_exp($trigger['expression'], false);
         if (strcmp($tmp_exp, $object['expression']) == 0) {
             $result = true;
             break;
         }
     }
     return $result;
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:33,代码来源:class.ctrigger.php


注:本文中的getNodeIdByNodeName函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。