• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/IoC/Container.php
  • Класс: BitrixCatalogv2IoCContainer
  • Вызов: Container::instantiate
private function instantiate($id, array $args = [])
{
	$this->lock();

	$dependency = $this->dependencies[$id];

	if ($dependency instanceof Closure)
	{
		$entity = $this->instantiateClosure($dependency, $args);
	}
	elseif (class_exists($dependency))
	{
		$entity = $this->instantiateClass($dependency, $args);
	}
	else
	{
		$entity = $dependency;
	}

	return $entity;
}