• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/Data/DataBroker.php
  • Класс: BitrixImConnectorDataDataBroker
  • Вызов: DataBroker::create
public function create(string $type = 'default')//: ?ORMObjectifyEntityObject
{
	if (!$this->has($type))
	{
		throw new MainObjectNotFoundException("Could not find data broker by code {$type}.");
	}

	if ($this->config[$type] instanceof Closure)
	{
		$construct = $this->config[$type];
		$object = $construct();
	}
	else
	{
		/** @var MainEntityDataManager $class */
		$class = $this->config[$type];
		$object = $class::createObject();
	}

	return $object;
}