• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/settings.php
  • Класс: BitrixTranslateSettings
  • Вызов: Settings::count
public function count($allowDirectFileAccess = false): int
{
	if ($this->optionsCount === null)
	{
		if ($this->options !== null && count($this->options) > 0)
		{
			$this->optionsCount = count($this->options);
		}
		elseif ($allowDirectFileAccess)
		{
			$options = include $this->getPhysicalPath();

			if (is_array($options) && count($options) > 0)
			{
				$this->optionsCount = count($options);
			}
		}
	}

	return $this->optionsCount ?: 0;
}