Source
public function findHostPrototypeidByHost(string $parent_hostid, string $discovery_ruleid, string $host): ?string {
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* 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 $host_prototypes = [];
protected $httptests = [];
protected $httpsteps = [];
protected $db_template_groups;
protected $db_host_groups;
protected $db_templates;
protected $db_hosts;
protected $db_items;