• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/volume/base.php
  • Класс: Bitrix\Crm\Volume\files
  • Вызов: files::loadListIndicator
static function loadListIndicator($libraryPath = '')
{
	$directory = new Main\IO\Directory(__DIR__. '/'. $libraryPath);
	$fileList = $directory->getChildren();
	foreach ($fileList as $entry)
	{
		if ($entry->isFile() && preg_match("/^(.+)\.php$/i", $entry->getName(), $parts))
		{
			$subNamespace = ($libraryPath != '' ? '\\'.$libraryPath : ''). '\\';
			/** @var Volume\IVolumeIndicator $indicatorType */
			$indicatorType = __NAMESPACE__. $subNamespace. $parts[1];
			try
			{
				$reflection = new \ReflectionClass($indicatorType);
				if (
					!$reflection->isInterface() &&
					!$reflection->isAbstract() &&
					!$reflection->isTrait() &&
					$reflection->implementsInterface(__NAMESPACE__.'\\IVolumeIndicator')
				)
				{
					self::$indicatorTypeList[$indicatorType::getIndicatorId()] = $indicatorType::className();
				}
			}
			catch(\ReflectionException $exception)
			{
			}
		}
		elseif ($entry->isDirectory())
		{
			self::loadListIndicator($entry->getName());
		}
	}
}