• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/phonenumber/phonenumber.php
  • Класс: BitrixMainPhoneNumberPhoneNumber
  • Вызов: PhoneNumber::format
public function format($formatType = '', $forceNationalPrefix = false)
{
	if($this->valid)
	{
		if($formatType == '')
		{
			return Formatter::formatOriginal($this);
		}
		else
		{
			return Formatter::format($this, $formatType, $forceNationalPrefix);
		}
	}
	else
	{
		if($formatType == '' && ShortNumberFormatter::isApplicable($this))
		{
			return ShortNumberFormatter::format($this);
		}
		else
		{
			return $this->rawNumber;
		}
	}
}