• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/uri.php
  • Класс: BitrixMainWebUri
  • Вызов: Uri::getAuthority
public function getAuthority(): string
{
	$authority = '';

	$userInfo = $this->getUserInfo();
	if ($userInfo != '')
	{
		$authority = $userInfo . '@';
	}

	$host = $this->getHost();
	if ($host != '')
	{
		$authority .= $host;
		$port = $this->getPort();

		if ($port !== null)
		{
			if (($this->scheme == 'http' && $port != 80) || ($this->scheme == 'https' && $port != 443))
			{
				$authority .= ':' . $port;
			}
		}
	}

	return $authority;
}