• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/IoC/ContainerBuilder.php
  • Класс: BitrixCatalogv2IoCContainerBuilder
  • Вызов: ContainerBuilder::loadDependencies
static function loadDependencies(string $customPath = null): array
{
	$dependencies = [];

	$configPaths = static::getConfigPaths();

	if ($customPath)
	{
		$configPaths[] = $customPath;
	}

	foreach ($configPaths as $configPath)
	{
		$current = include($configPath);

		if (is_array($current))
		{
			$dependencies[] = $current;
		}
		else
		{
			throw new NotSupportedException(sprintf(
				'Config {%s} must return an array.', $current
			));
		}
	}

	return array_merge(...$dependencies);
}