• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/volume/base.php
  • Класс: BitrixDiskVolumeBase
  • Вызов: Base::getIndicator
static function getIndicator($indicatorTypeId)
{
	if (!$indicatorTypeId)
	{
		throw new MainArgumentNullException('Wrong parameter indicatorTypeId');
	}

	if (mb_strpos($indicatorTypeId, __NAMESPACE__) !== false)
	{
		$className = $indicatorTypeId;
	}
	else
	{
		$className = __NAMESPACE__.'\'.str_replace('_', '\', $indicatorTypeId);
	}

	/** @var VolumeIVolumeIndicator $indicator */
	$indicator = new $className();
	if (!$indicator instanceof VolumeIVolumeIndicator)
	{
		throw new MainObjectException('Return must implements '. __NAMESPACE__. '\IVolumeIndicator interface.');
	}

	return $indicator;
}