• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/objectify/identitymap.php
  • Класс: BitrixMainORMObjectifyIdentityMap
  • Вызов: IdentityMap::getCollectionByClass
public function getCollectionByClass($class)
{
	if (empty($this->collections[$class]))
	{
		$normalizedClass = Entity::normalizeName($class);

		if (!empty($this->collections[$normalizedClass]))
		{
			$this->collections[$class] = $this->collections[$normalizedClass];
		}
		else
		{
			if (Entity::has($normalizedClass))
			{
				$entity = Entity::get($normalizedClass);
			}
			else
			{
				/** @var $normalizedClass EntityObject custom object class */
				$entity = Entity::getInstance($normalizedClass::$dataClass);
			}

			$collection = $entity->createCollection();

			$this->collections[$class] = $collection;
			$this->collections[$normalizedClass] = $collection;
		}
	}

	return $this->collections[$class];
}