• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/data/connectionpool.php
  • Класс: BitrixMainDataConnectionPool
  • Вызов: ConnectionPool::getConnection
public function getConnection($name = "")
{
	if ($name === "")
	{
		$name = self::DEFAULT_CONNECTION_NAME;
	}

	if (!isset($this->connections[$name]))
	{
		$connParameters = $this->getConnectionParameters($name);
		if (!empty($connParameters) && is_array($connParameters))
		{
			$this->createConnection($name, $connParameters);
		}
	}

	if (isset($this->connections[$name]))
	{
		return $this->connections[$name];
	}

	return null;
}