• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/IoC/Container.php
  • Класс: BitrixCatalogv2IoCContainer
  • Вызов: Container::get
public function get(string $id, array $args = [])
{
	if (!$this->has($id))
	{
		throw new ObjectNotFoundException("Dependency {{$id}} not found.");
	}

	$definition = $this->getDefinition($id, $args);

	if (!isset($this->entities[$definition]))
	{
		$this->entities[$definition] = $this->instantiate($id, $args);
	}

	return $this->entities[$definition];
}