<?php declare(strict_types = 0);
/*
** Copyright (C) 2021-2026 initMAX s.r.o.
**
** 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/>.
**/


namespace Modules\TetrisMAX\Includes;

/**
 * What this frontend can do.
 *
 * A CAPABILITY probe, never a parsed version number: a customer can upgrade
 * the Zabbix frontend under an installed module, and the 6.0 LTS kept
 * receiving backports after 6.2 went end of life, so ">= x.y" is not a
 * description of anything.
 */
final class Compat {

	/**
	 * Does the widget-field VIEW take a "?" tooltip of its own?
	 *
	 * setFieldHint() arrived in 7.0. 6.4 runs the same manifest-v2 tree against
	 * the older form API, where the equivalent is setHelpHint(string) - enough
	 * of a difference that 6.4 gets its own edit view rather than a probe
	 * inside this one.
	 */
	public static function hasFieldHintApi(): bool {
		return method_exists('CWidgetFieldView', 'setFieldHint');
	}
}
