Source for file tel.php
Documentation is available at tel.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* HTML helper class for rendering telephone numbers.
* @package Joomla.Libraries
* Converts strings of integers into more readable telephone format
* By default, the ITU-T format will automatically be used.
* However, one of the allowed unit types may also be used instead.
* @param integer $number The integers in a phone number with dot separated country code
* ccc.nnnnnnn where ccc represents country code and nnn represents the local number.
* @param string $displayplan The numbering plan used to display the numbers.
* @return string The formatted telephone number.
public static function tel($number, $displayplan)
$countrycode =
$number[0];
if ($displayplan ==
'ITU-T' ||
$displayplan ==
'International' ||
$displayplan ==
'int' ||
$displayplan ==
'missdn' ||
$displayplan ==
null)
$display[1] =
$countrycode;
elseif ($displayplan ==
'NANP' ||
$displayplan ==
'northamerica' ||
$displayplan ==
'US')
$display[1] =
substr($number, 0, 3);
$display[3] =
substr($number, 3, 3);
$display[5] =
substr($number, 6, 4);
elseif ($displayplan ==
'EPP' ||
$displayplan ==
'IETF')
$display[1] =
$countrycode;
elseif ($displayplan ==
'ARPA' ||
$displayplan ==
'ENUM')
$display[3] =
$countrycode;
$display[4] =
'.e164.arpa';
Documentation generated on Tue, 19 Nov 2013 15:15:22 +0100 by phpDocumentor 1.4.3