Source
public function findHostPrototypeidByHost(string $parent_hostid, string $discovery_ruleid, string $host): ?string {
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* Class that handles associations for zabbix elements unique fields and their database ids.
* The purpose is to gather all elements that need ids from database and resolve them with one query.
*/
class CImportReferencer {
/**
* @var array with references to interfaceid (hostid -> reference_name -> interfaceid)
*/
public $interfaces_cache = [];
protected $template_groups = [];
protected $host_groups = [];
protected $templates = [];
protected $hosts = [];
protected $items = [];
protected $valuemaps = [];
protected $triggers = [];
protected $graphs = [];
protected $iconmaps = [];
protected $images = [];
protected $maps = [];
protected $services = [];
protected $slas = [];
protected $users = [];
protected $actions = [];
protected $media_types = [];
protected $template_dashboards = [];
protected $template_macros = [];
protected $host_macros = [];
protected $group_prototypes = [];
protected $host_prototype_macros = [];
protected $proxies = [];
protected $proxy_groups = [];
protected $host_prototypes = [];
protected $httptests = [];
protected $httpsteps = [];
protected $db_template_groups;
protected $db_host_groups;
protected $db_templates;
protected $db_hosts;
protected $db_items;
protected $db_valuemaps;
protected $db_triggers;
protected $db_graphs;
protected $db_iconmaps;