update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -12,16 +12,12 @@ class Issue106Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
self::$TW_Number1 = new PhoneNumber();
|
||||
self::$TW_Number1->setCountryCode(886)->setNationalNumber(223113731);
|
||||
self::$TW_Number1 = new PhoneNumber();
|
||||
self::$TW_Number1->setCountryCode(886)->setNationalNumber(223113731);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberOfflineGeocoder::resetInstance();
|
||||
$this->geocoder = PhoneNumberOfflineGeocoder::getInstance();
|
||||
}
|
||||
@@ -39,6 +35,5 @@ class Issue106Test extends \PHPUnit_Framework_TestCase
|
||||
pack('H*', 'e887ba') . pack('H*', 'e58c97'),
|
||||
$this->geocoder->getDescriptionForNumber(self::$TW_Number1, "zh_TW")
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberType;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\geocoding\PhoneNumberOfflineGeocoder;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
@@ -20,10 +19,6 @@ class Issue17Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberUtil::resetInstance();
|
||||
PhoneNumberOfflineGeocoder::resetInstance();
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\geocoding\PhoneNumberOfflineGeocoder;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use libphonenumber\RegionCode;
|
||||
@@ -23,9 +22,7 @@ class Issue23Test extends \PHPUnit_Framework_TestCase
|
||||
PhoneNumberUtil::resetInstance();
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance();
|
||||
|
||||
if(extension_loaded('intl')) {
|
||||
$this->geocoder = PhoneNumberOfflineGeocoder::getInstance();
|
||||
}
|
||||
$this->geocoder = PhoneNumberOfflineGeocoder::getInstance();
|
||||
}
|
||||
|
||||
public function testTKGeoLocation()
|
||||
@@ -36,8 +33,6 @@ class Issue23Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals('TK', $this->phoneUtil->getRegionCodeForNumber($phoneNumber));
|
||||
|
||||
if($this->geocoder instanceof PhoneNumberOfflineGeocoder) {
|
||||
$this->assertEquals('Tokelau', $this->geocoder->getDescriptionForNumber($phoneNumber, 'en'));
|
||||
}
|
||||
$this->assertEquals('Tokelau', $this->geocoder->getDescriptionForNumber($phoneNumber, 'en'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
class Issue34Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumber;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\geocoding\PhoneNumberOfflineGeocoder;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
@@ -20,10 +19,6 @@ class Issue36Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberUtil::resetInstance();
|
||||
PhoneNumberOfflineGeocoder::resetInstance();
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance();
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
@@ -25,6 +24,5 @@ class Issue3Test extends \PHPUnit_Framework_TestCase
|
||||
$number = $this->phoneNumberUtil->parse('011543549480042', 'US');
|
||||
|
||||
$this->assertEquals("+543549480042", $this->phoneNumberUtil->format($number, PhoneNumberFormat::E164));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,6 @@ class Issue44Test extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberUtil::resetInstance();
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance();
|
||||
|
||||
@@ -79,4 +75,3 @@ class Issue44Test extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals("China Mobile", $location);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
@@ -25,6 +24,5 @@ class Issue4Test extends \PHPUnit_Framework_TestCase
|
||||
$number = $this->phoneNumberUtil->parse('0351-152-303-473', 'AR');
|
||||
|
||||
$this->assertEquals("+5493512303473", $this->phoneNumberUtil->format($number, PhoneNumberFormat::E164));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use libphonenumber\ShortNumberInfo;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use libphonenumber\ShortNumberInfo;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\CountryCodeToRegionCodeMap;
|
||||
use libphonenumber\geocoding\PhoneNumberOfflineGeocoder;
|
||||
use libphonenumber\PhoneNumberType;
|
||||
@@ -29,10 +28,6 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberUtil::resetInstance();
|
||||
PhoneNumberOfflineGeocoder::resetInstance();
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance();
|
||||
@@ -74,9 +69,6 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* This list was got from the Internet, and altered slightly to make the tests pass
|
||||
*
|
||||
* Bad country codes were removed, and names updated to match my Windows 7 Locale settings (these might be different
|
||||
* on different operating systems and other Locales).
|
||||
*
|
||||
* @see https://gist.github.com/vxnick/380904
|
||||
* @return array
|
||||
*/
|
||||
@@ -91,7 +83,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'AD' => 'Andorra',
|
||||
'AO' => 'Angola',
|
||||
'AI' => 'Anguilla',
|
||||
'AG' => 'Antigua and Barbuda',
|
||||
'AG' => 'Antigua & Barbuda',
|
||||
'AR' => 'Argentina',
|
||||
'AU' => 'Australia',
|
||||
'AT' => 'Austria',
|
||||
@@ -107,7 +99,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'BM' => 'Bermuda',
|
||||
'BT' => 'Bhutan',
|
||||
'BO' => 'Bolivia',
|
||||
'BA' => 'Bosnia and Herzegovina',
|
||||
'BA' => 'Bosnia & Herzegovina',
|
||||
'BW' => 'Botswana',
|
||||
'BR' => 'Brazil',
|
||||
'IO' => 'British Indian Ocean Territory',
|
||||
@@ -125,7 +117,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'CL' => 'Chile',
|
||||
'CN' => 'China',
|
||||
'CX' => 'Christmas Island',
|
||||
'CC' => 'Cocos [Keeling] Islands',
|
||||
'CC' => 'Cocos (Keeling) Islands',
|
||||
'CO' => 'Colombia',
|
||||
'KM' => 'Comoros',
|
||||
'CG' => 'Congo - Brazzaville',
|
||||
@@ -226,7 +218,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'MS' => 'Montserrat',
|
||||
'MA' => 'Morocco',
|
||||
'MZ' => 'Mozambique',
|
||||
'MM' => 'Myanmar [Burma]',
|
||||
'MM' => 'Myanmar (Burma)',
|
||||
'NA' => 'Namibia',
|
||||
'NR' => 'Nauru',
|
||||
'NP' => 'Nepal',
|
||||
@@ -257,14 +249,14 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'RO' => 'Romania',
|
||||
'RU' => 'Russia',
|
||||
'RW' => 'Rwanda',
|
||||
'SH' => 'Saint Helena',
|
||||
'KN' => 'Saint Kitts and Nevis',
|
||||
'LC' => 'Saint Lucia',
|
||||
'PM' => 'Saint Pierre and Miquelon',
|
||||
'VC' => 'Saint Vincent and the Grenadines',
|
||||
'SH' => 'St. Helena',
|
||||
'KN' => 'St. Kitts & Nevis',
|
||||
'LC' => 'St. Lucia',
|
||||
'PM' => 'St. Pierre & Miquelon',
|
||||
'VC' => 'St. Vincent & Grenadines',
|
||||
'WS' => 'Samoa',
|
||||
'SM' => 'San Marino',
|
||||
'ST' => 'São Tomé and Príncipe',
|
||||
'ST' => 'São Tomé & Príncipe',
|
||||
'SA' => 'Saudi Arabia',
|
||||
'SN' => 'Senegal',
|
||||
'RS' => 'Serbia',
|
||||
@@ -280,7 +272,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'LK' => 'Sri Lanka',
|
||||
'SD' => 'Sudan',
|
||||
'SR' => 'Suriname',
|
||||
'SJ' => 'Svalbard and Jan Mayen',
|
||||
'SJ' => 'Svalbard & Jan Mayen',
|
||||
'SZ' => 'Swaziland',
|
||||
'SE' => 'Sweden',
|
||||
'CH' => 'Switzerland',
|
||||
@@ -293,11 +285,11 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'TG' => 'Togo',
|
||||
'TK' => 'Tokelau',
|
||||
'TO' => 'Tonga',
|
||||
'TT' => 'Trinidad and Tobago',
|
||||
'TT' => 'Trinidad & Tobago',
|
||||
'TN' => 'Tunisia',
|
||||
'TR' => 'Turkey',
|
||||
'TM' => 'Turkmenistan',
|
||||
'TC' => 'Turks and Caicos Islands',
|
||||
'TC' => 'Turks & Caicos Islands',
|
||||
'TV' => 'Tuvalu',
|
||||
'UG' => 'Uganda',
|
||||
'UA' => 'Ukraine',
|
||||
@@ -311,7 +303,7 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
|
||||
'VN' => 'Vietnam',
|
||||
'VG' => 'British Virgin Islands',
|
||||
'VI' => 'U.S. Virgin Islands',
|
||||
'WF' => 'Wallis and Futuna',
|
||||
'WF' => 'Wallis & Futuna',
|
||||
'EH' => 'Western Sahara',
|
||||
'YE' => 'Yemen',
|
||||
'ZM' => 'Zambia',
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\Issues;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberType;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
|
||||
class UKNumbersTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
const META_DATA_FILE_PREFIX = 'PhoneNumberMetadata';
|
||||
@@ -22,7 +21,8 @@ class UKNumbersTest extends \PHPUnit_Framework_TestCase
|
||||
$this->phoneUtil = PhoneNumberUtil::getInstance(
|
||||
self::META_DATA_FILE_PREFIX,
|
||||
CountryCodeToRegionCodeMap::$countryCodeToRegionCodeMap
|
||||
);;
|
||||
);
|
||||
;
|
||||
}
|
||||
|
||||
public function testMobileNumber()
|
||||
|
||||
@@ -0,0 +1,915 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @author giggsey
|
||||
* @package libphonenumber-for-php
|
||||
*/
|
||||
|
||||
namespace libphonenumber\Tests\buildtools;
|
||||
|
||||
use libphonenumber\buildtools\BuildMetadataFromXml;
|
||||
use libphonenumber\NumberFormat;
|
||||
use libphonenumber\PhoneMetadata;
|
||||
use libphonenumber\PhoneNumberDesc;
|
||||
|
||||
class BuildMetadataFromXmlTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @param $xmlString
|
||||
* @return \DOMElement
|
||||
*/
|
||||
private function parseXMLString($xmlString)
|
||||
{
|
||||
$domDocument = new \DOMDocument();
|
||||
$domDocument->loadXML($xmlString);
|
||||
|
||||
return $domDocument->documentElement;
|
||||
}
|
||||
|
||||
public function testValidateRERemovesWhiteSpaces()
|
||||
{
|
||||
$input = " hello world ";
|
||||
// Should remove all the white spaces contained in the provided string.
|
||||
$this->assertEquals("helloworld", BuildMetadataFromXml::validateRE($input, true));
|
||||
// Make sure it only happens when the last parameter is set to true.
|
||||
$this->assertEquals(" hello world ", BuildMetadataFromXml::validateRE($input, false));
|
||||
}
|
||||
|
||||
public function testValidateREThrowsException()
|
||||
{
|
||||
$invalidPattern = '[';
|
||||
// Should throw an exception when an invalid pattern is provided independently of the last
|
||||
// parameter (remove white spaces).
|
||||
try {
|
||||
BuildMetadataFromXml::validateRE($invalidPattern, false);
|
||||
$this->fail();
|
||||
} catch (\Exception $e) {
|
||||
// Test passed.
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
||||
try {
|
||||
BuildMetadataFromXml::validateRE($invalidPattern, true);
|
||||
$this->fail();
|
||||
} catch (\Exception $e) {
|
||||
// Test passed.
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
|
||||
// We don't allow | to be followed by ) because it introduces bugs, since we typically use it at
|
||||
// the end of each line and when a line is deleted, if the pipe from the previous line is not
|
||||
// removed, we end up erroneously accepting an empty group as well.
|
||||
$patternWithPipeFollowedByClosingParentheses = '|)';
|
||||
try {
|
||||
BuildMetadataFromXml::validateRE($patternWithPipeFollowedByClosingParentheses, true);
|
||||
$this->fail();
|
||||
} catch (\Exception $e) {
|
||||
// Test passed.
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
$patternWithPipeFollowedByNewLineAndClosingParentheses = "|\n)";
|
||||
try {
|
||||
BuildMetadataFromXml::validateRE($patternWithPipeFollowedByNewLineAndClosingParentheses, true);
|
||||
$this->fail();
|
||||
} catch (\Exception $e) {
|
||||
// Test passed.
|
||||
$this->addToAssertionCount(1);
|
||||
}
|
||||
}
|
||||
|
||||
public function testValidateRE()
|
||||
{
|
||||
$validPattern = "[a-zA-Z]d{1,9}";
|
||||
// The provided pattern should be left unchanged.
|
||||
$this->assertEquals($validPattern, BuildMetadataFromXml::validateRE($validPattern, false));
|
||||
}
|
||||
|
||||
public function testGetNationalPrefix()
|
||||
{
|
||||
$xmlInput = "<territory nationalPrefix='00'/>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$this->assertEquals('00', BuildMetadataFromXml::getNationalPrefix($territoryElement));
|
||||
}
|
||||
|
||||
public function testLoadTerritoryTagMetadata()
|
||||
{
|
||||
$xmlInput = "<territory"
|
||||
. " countryCode='33' leadingDigits='2' internationalPrefix='00'"
|
||||
. " preferredInternationalPrefix='0011' nationalPrefixForParsing='0'"
|
||||
. " nationalPrefixTransformRule='9$1'" // nationalPrefix manually injected.
|
||||
. " preferredExtnPrefix=' x' mainCountryForCode='true'"
|
||||
. " leadingZeroPossible='true' mobileNumberPortableRegion='true'>"
|
||||
. "</territory>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$phoneMetadata = BuildMetadataFromXml::loadTerritoryTagMetadata('33', $territoryElement, '0');
|
||||
$this->assertEquals(33, $phoneMetadata->getCountryCode());
|
||||
$this->assertEquals("2", $phoneMetadata->getLeadingDigits());
|
||||
$this->assertEquals("00", $phoneMetadata->getInternationalPrefix());
|
||||
$this->assertEquals("0011", $phoneMetadata->getPreferredInternationalPrefix());
|
||||
$this->assertEquals("0", $phoneMetadata->getNationalPrefixForParsing());
|
||||
$this->assertEquals("9$1", $phoneMetadata->getNationalPrefixTransformRule());
|
||||
$this->assertEquals("0", $phoneMetadata->getNationalPrefix());
|
||||
$this->assertEquals(" x", $phoneMetadata->getPreferredExtnPrefix());
|
||||
$this->assertTrue($phoneMetadata->isMainCountryForCode());
|
||||
$this->assertTrue($phoneMetadata->isLeadingZeroPossible());
|
||||
$this->assertTrue($phoneMetadata->isMobileNumberPortableRegion());
|
||||
}
|
||||
|
||||
public function testLoadTerritoryTagMetadataSetsBooleanFieldsToFalseByDefault()
|
||||
{
|
||||
$xmlInput = "<territory countryCode='33'/>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$phoneMetadata = BuildMetadataFromXml::loadTerritoryTagMetadata('33', $territoryElement, '');
|
||||
$this->assertFalse($phoneMetadata->isMainCountryForCode());
|
||||
$this->assertFalse($phoneMetadata->isLeadingZeroPossible());
|
||||
$this->assertFalse($phoneMetadata->isMobileNumberPortableRegion());
|
||||
}
|
||||
|
||||
public function testLoadTerritoryTagMetadataSetsNationalPrefixForParsingByDefault()
|
||||
{
|
||||
$xmlInput = "<territory countryCode='33'/>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$phoneMetadata = BuildMetadataFromXml::loadTerritoryTagMetadata('33', $territoryElement, '00');
|
||||
// When unspecified, nationalPrefixForParsing defaults to nationalPrefix.
|
||||
$this->assertEquals("00", $phoneMetadata->getNationalPrefix());
|
||||
$this->assertEquals($phoneMetadata->getNationalPrefix(), $phoneMetadata->getNationalPrefixForParsing());
|
||||
}
|
||||
|
||||
public function testLoadTerritoryTagMetadataWithRequiredAttributesOnly()
|
||||
{
|
||||
$xmlInput = "<territory countryCode='33' internationalPrefix='00'/>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
// Should not throw any exception
|
||||
BuildMetadataFromXml::loadTerritoryTagMetadata('33', $territoryElement, '');
|
||||
}
|
||||
|
||||
public function testLoadInternationalFormat()
|
||||
{
|
||||
$intlFormat = '$1 $2';
|
||||
$xmlInput = "<numberFormat><intlFormat>" . $intlFormat . "</intlFormat></numberFormat>";
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$nationalFormat = new NumberFormat();
|
||||
|
||||
$this->assertTrue(BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, $nationalFormat));
|
||||
$this->assertEquals($intlFormat, $metadata->getIntlNumberFormat(0)->getFormat());
|
||||
}
|
||||
|
||||
public function testLoadInternationalFormatWithBothNationalAndIntlFormatsDefined()
|
||||
{
|
||||
$intlFormat = '$1 $2';
|
||||
$xmlInput = "<numberFormat><intlFormat>" . $intlFormat . "</intlFormat></numberFormat>";
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$nationalFormat = new NumberFormat();
|
||||
$nationalFormat->setFormat('$1');
|
||||
|
||||
$this->assertTrue(BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, $nationalFormat));
|
||||
$this->assertEquals($intlFormat, $metadata->getIntlNumberFormat(0)->getFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testLoadInternationalFormatExpectsOnlyOnePattern()
|
||||
{
|
||||
$xmlInput = '<numberFormat><intlFormat/><intlFormat/></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
|
||||
// Should throw an exception as multiple intlFormats are provided
|
||||
BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, new NumberFormat());
|
||||
}
|
||||
|
||||
public function testLoadInternationalFormatUsesNationalFormatByDefault()
|
||||
{
|
||||
$xmlInput = '<numberFormat></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$nationalFormat = new NumberFormat();
|
||||
$nationPattern = '$1 $2 $3';
|
||||
$nationalFormat->setFormat($nationPattern);
|
||||
|
||||
$this->assertFalse(BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, $nationalFormat));
|
||||
$this->assertEquals($nationPattern, $metadata->getIntlNumberFormat(0)->getFormat());
|
||||
}
|
||||
|
||||
public function testLoadInternationalFormatCopiesNationalFormatData()
|
||||
{
|
||||
$xmlInput = '<numberFormat></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$nationalFormat = new NumberFormat();
|
||||
$nationalFormat->setFormat('$1-$2');
|
||||
$nationalFormat->setNationalPrefixOptionalWhenFormatting(true);
|
||||
|
||||
$this->assertFalse(BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, $nationalFormat));
|
||||
$this->assertTrue($metadata->getIntlNumberFormat(0)->isNationalPrefixOptionalWhenFormatting());
|
||||
}
|
||||
|
||||
public function testLoadNationalFormat()
|
||||
{
|
||||
$nationalFormat = '$1 $2';
|
||||
$xmlInput = '<numberFormat><format>' . $nationalFormat . '</format></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$numberFormat = new NumberFormat();
|
||||
BuildMetadataFromXml::loadNationalFormat($metadata, $numberFormatElement, $numberFormat);
|
||||
$this->assertEquals($nationalFormat, $numberFormat->getFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testLoadNationalFormatRequiresFormat()
|
||||
{
|
||||
$xmlInput = '<numberFormat></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$numberFormat = new NumberFormat();
|
||||
|
||||
BuildMetadataFromXml::loadNationalFormat($metadata, $numberFormatElement, $numberFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testLoadNationalFormatExpectsExactlyOneFormat()
|
||||
{
|
||||
$xmlInput = "<numberFormat><format/><format/></numberFormat>";
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$numberFormat = new NumberFormat();
|
||||
|
||||
BuildMetadataFromXml::loadNationalFormat($metadata, $numberFormatElement, $numberFormat);
|
||||
}
|
||||
|
||||
public function testLoadAvailableFormats()
|
||||
{
|
||||
$xmlInput = '<territory>'
|
||||
. ' <availableFormats>'
|
||||
. ' <numberFormat nationalPrefixFormattingRule=\'($FG)\''
|
||||
. ' carrierCodeFormattingRule=\'$NP $CC ($FG)\'>'
|
||||
. ' <format>$1 $2 $3</format>'
|
||||
. ' </numberFormat>'
|
||||
. ' </availableFormats>'
|
||||
. '</territory>';
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '0', '', false /* NP not optional */);
|
||||
$this->assertEquals('($1)', $metadata->getNumberFormat(0)->getNationalPrefixFormattingRule());
|
||||
$this->assertEquals('0 $CC ($1)', $metadata->getNumberFormat(0)->getDomesticCarrierCodeFormattingRule());
|
||||
$this->assertEquals('$1 $2 $3', $metadata->getNumberFormat(0)->getFormat());
|
||||
}
|
||||
|
||||
public function testLoadAvailableFormatsPropagatesCarrierCodeFormattingRule()
|
||||
{
|
||||
$xmlInput =
|
||||
'<territory carrierCodeFormattingRule=\'$NP $CC ($FG)\'>'
|
||||
. ' <availableFormats>'
|
||||
. ' <numberFormat nationalPrefixFormattingRule=\'($FG)\'>'
|
||||
. ' <format>$1 $2 $3</format>'
|
||||
. ' </numberFormat>'
|
||||
. ' </availableFormats>'
|
||||
. '</territory>';
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '0', '', false /* NP not optional */);
|
||||
$this->assertEquals('($1)', $metadata->getNumberFormat(0)->getNationalPrefixFormattingRule());
|
||||
$this->assertEquals('0 $CC ($1)', $metadata->getNumberFormat(0)->getDomesticCarrierCodeFormattingRule());
|
||||
$this->assertEquals('$1 $2 $3', $metadata->getNumberFormat(0)->getFormat());
|
||||
}
|
||||
|
||||
public function testLoadAvailableFormatsSetsProvidedNationalPrefixFormattingRule()
|
||||
{
|
||||
$xmlInput = "<territory>"
|
||||
. " <availableFormats>"
|
||||
. ' <numberFormat><format>$1 $2 $3</format></numberFormat>'
|
||||
. " </availableFormats>"
|
||||
. "</territory>";
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '', '($1)', false /* NP not optional */);
|
||||
$this->assertEquals('($1)', $metadata->getNumberFormat(0)->getNationalPrefixFormattingRule());
|
||||
}
|
||||
|
||||
public function testLoadAvailableFormatsClearsIntlFormat()
|
||||
{
|
||||
$xmlInput = "<territory>"
|
||||
. " <availableFormats>"
|
||||
. ' <numberFormat><format>$1 $2 $3</format></numberFormat>'
|
||||
. " </availableFormats>"
|
||||
. "</territory>";
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '0', '($1)', false /* NP not optional */);
|
||||
$this->assertCount(0, $metadata->intlNumberFormats());
|
||||
}
|
||||
|
||||
public function testLoadAvailableFormatsHandlesMultipleNumberFormats()
|
||||
{
|
||||
$xmlInput = "<territory>"
|
||||
. " <availableFormats>"
|
||||
. ' <numberFormat><format>$1 $2 $3</format></numberFormat>'
|
||||
. ' <numberFormat><format>$1-$2</format></numberFormat>'
|
||||
. " </availableFormats>"
|
||||
. "</territory>";
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '0', '($1)', false /* NP not optional */);
|
||||
$this->assertEquals('$1 $2 $3', $metadata->getNumberFormat(0)->getFormat());
|
||||
$this->assertEquals('$1-$2', $metadata->getNumberFormat(1)->getFormat());
|
||||
}
|
||||
|
||||
public function testLoadInternationalFormatDoesNotSetIntlFormatWhenNA()
|
||||
{
|
||||
$xmlInput = '<numberFormat><intlFormat>NA</intlFormat></numberFormat>';
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
$nationalFormat = new NumberFormat();
|
||||
$nationalFormat->setFormat('$1 $2');
|
||||
|
||||
BuildMetadataFromXml::loadInternationalFormat($metadata, $numberFormatElement, $nationalFormat);
|
||||
$this->assertCount(0, $metadata->intlNumberFormats());
|
||||
}
|
||||
|
||||
public function testSetLeadingDigitsPatterns()
|
||||
{
|
||||
$xmlInput = "<numberFormat>"
|
||||
. "<leadingDigits>1</leadingDigits><leadingDigits>2</leadingDigits>"
|
||||
. "</numberFormat>";
|
||||
|
||||
$numberFormatElement = $this->parseXMLString($xmlInput);
|
||||
$numberFormat = new NumberFormat();
|
||||
BuildMetadataFromXml::setLeadingDigitsPatterns($numberFormatElement, $numberFormat);
|
||||
|
||||
$this->assertEquals('1', $numberFormat->getLeadingDigitsPattern(0));
|
||||
$this->assertEquals('2', $numberFormat->getLeadingDigitsPattern(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests setLeadingDigitsPatterns() in the case of international and national formatting rules
|
||||
* being present but not both defined for this numberFormat - we don't want to add them twice.
|
||||
*/
|
||||
public function testSetLeadingDigitsPatternsNotAddedTwiceWhenInternationalFormatsPresent()
|
||||
{
|
||||
$xmlInput = "<availableFormats>"
|
||||
. " <numberFormat pattern=\"(1)(\\d{3})\">"
|
||||
. " <leadingDigits>1</leadingDigits>"
|
||||
. ' <format>$1</format>'
|
||||
. " </numberFormat>"
|
||||
. " <numberFormat pattern=\"(2)(\\d{3})\">"
|
||||
. " <leadingDigits>2</leadingDigits>"
|
||||
. ' <format>$1</format>'
|
||||
. ' <intlFormat>9-$1</intlFormat>'
|
||||
. " </numberFormat>"
|
||||
. "</availableFormats>";
|
||||
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::loadAvailableFormats($metadata, $element, '0', '', false /* NP not optional */);
|
||||
$this->assertCount(1, $metadata->getNumberFormat(0)->leadingDigitPatterns());
|
||||
$this->assertCount(1, $metadata->getNumberFormat(1)->leadingDigitPatterns());
|
||||
// When we merge the national format rules into the international format rules, we shouldn't add
|
||||
// the leading digit patterns multiple times.
|
||||
$this->assertCount(1, $metadata->getIntlNumberFormat(0)->leadingDigitPatterns());
|
||||
$this->assertCount(1, $metadata->getIntlNumberFormat(1)->leadingDigitPatterns());
|
||||
}
|
||||
|
||||
public function testGetNationalPrefixFormattingRuleFromElement()
|
||||
{
|
||||
$xmlInput = '<territory nationalPrefixFormattingRule="$NP$FG" />';
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$this->assertEquals('0$1', BuildMetadataFromXml::getNationalPrefixFormattingRuleFromElement($element, '0'));
|
||||
}
|
||||
|
||||
public function testGetDomesticCarrierCodeFormattingRuleFromElement()
|
||||
{
|
||||
$xmlInput = '<territory carrierCodeFormattingRule=\'$NP$CC $FG\'/>';
|
||||
$element = $this->parseXMLString($xmlInput);
|
||||
$this->assertEquals('0$CC $1', BuildMetadataFromXml::getDomesticCarrierCodeFormattingRuleFromElement($element, '0'));
|
||||
}
|
||||
|
||||
public function testIsValidNumberTypeWithInvalidInput()
|
||||
{
|
||||
$this->assertFalse(BuildMetadataFromXml::numberTypeShouldAlwaysBeFilledIn('invalidType'));
|
||||
$this->assertFalse(BuildMetadataFromXml::numberTypeShouldAlwaysBeFilledIn('tollFree'));
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElementWithInvalidInputWithRegex()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$territoryElement = $this->parseXMLString("<territory/>");
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'invalidType', false);
|
||||
$this->assertEquals('NA', $phoneNumberDesc->getPossibleNumberPattern());
|
||||
$this->assertEquals('NA', $phoneNumberDesc->getNationalNumberPattern());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElementMergesWithGeneralDesc()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleNumberPattern('\\d{6}');
|
||||
$territoryElement = $this->parseXMLString('<territory><fixedLine/></territory>');
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false);
|
||||
$this->assertEquals('\\d{6}', $phoneNumberDesc->getPossibleNumberPattern());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElementOverridesGeneralDesc()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleNumberPattern('\\d{8');
|
||||
$xmlInput = "<territory><fixedLine>"
|
||||
. " <possibleNumberPattern>\\d{6}</possibleNumberPattern>"
|
||||
. "</fixedLine></territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false);
|
||||
$this->assertEquals('\\d{6}', $phoneNumberDesc->getPossibleNumberPattern());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElementHandlesLiteBuild()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$xmlInput = "<territory><fixedLine>"
|
||||
. " <exampleNumber>01 01 01 01</exampleNumber>"
|
||||
. "</fixedLine></territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', true);
|
||||
$this->assertEquals('', $phoneNumberDesc->getExampleNumber());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescOutputsExampleNumberByDefault()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$xmlInput = "<territory><fixedLine>"
|
||||
. " <exampleNumber>01 01 01 01</exampleNumber>"
|
||||
. "</fixedLine></territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false);
|
||||
$this->assertEquals('01 01 01 01', $phoneNumberDesc->getExampleNumber());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescRemovesWhiteSpacesInPatterns()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$xmlInput = "<territory><fixedLine>"
|
||||
. " <possibleNumberPattern>\t \\d { 6 } </possibleNumberPattern>"
|
||||
. "</fixedLine></territory>";
|
||||
|
||||
$countryElement = $this->parseXMLString($xmlInput);
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $countryElement, 'fixedLine', false);
|
||||
$this->assertEquals('\\d{6}', $phoneNumberDesc->getPossibleNumberPattern());
|
||||
}
|
||||
|
||||
public function testSetRelevantDescPatternsSetsSameMobileAndFixedLinePattern()
|
||||
{
|
||||
$xmlInput = "<territory countryCode=\"33\">"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{6}</nationalNumberPattern></fixedLine>"
|
||||
. " <mobile><nationalNumberPattern>\\d{6}</nationalNumberPattern></mobile>"
|
||||
. "</territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
// Should set sameMobileAndFixedPattern to true.
|
||||
BuildMetadataFromXml::setRelevantDescPatterns($metadata, $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */);
|
||||
$this->assertTrue($metadata->hasSameMobileAndFixedLinePattern());
|
||||
}
|
||||
|
||||
public function testSetRelevantDescPatternsSetsAllDescriptionsForRegularLengthNumbers()
|
||||
{
|
||||
$xmlInput = "<territory countryCode=\"33\">"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{1}</nationalNumberPattern></fixedLine>"
|
||||
. " <mobile><nationalNumberPattern>\\d{2}</nationalNumberPattern></mobile>"
|
||||
. " <pager><nationalNumberPattern>\\d{3}</nationalNumberPattern></pager>"
|
||||
. " <tollFree><nationalNumberPattern>\\d{4}</nationalNumberPattern></tollFree>"
|
||||
. " <premiumRate><nationalNumberPattern>\\d{5}</nationalNumberPattern></premiumRate>"
|
||||
. " <sharedCost><nationalNumberPattern>\\d{6}</nationalNumberPattern></sharedCost>"
|
||||
. " <personalNumber><nationalNumberPattern>\\d{7}</nationalNumberPattern></personalNumber>"
|
||||
. " <voip><nationalNumberPattern>\\d{8}</nationalNumberPattern></voip>"
|
||||
. " <uan><nationalNumberPattern>\\d{9}</nationalNumberPattern></uan>"
|
||||
. "</territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::setRelevantDescPatterns($metadata, $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */);
|
||||
$this->assertEquals("\\d{1}", $metadata->getFixedLine()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{2}", $metadata->getMobile()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{3}", $metadata->getPager()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{4}", $metadata->getTollFree()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{5}", $metadata->getPremiumRate()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{6}", $metadata->getSharedCost()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{7}", $metadata->getPersonalNumber()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{8}", $metadata->getVoip()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{9}", $metadata->getUan()->getNationalNumberPattern());
|
||||
}
|
||||
|
||||
public function testSetRelevantDescPatternsSetsAllDescriptionsForShortNumbers()
|
||||
{
|
||||
$xmlInput = "<territory ID=\"FR\">"
|
||||
. " <tollFree><nationalNumberPattern>\\d{1}</nationalNumberPattern></tollFree>"
|
||||
. " <standardRate><nationalNumberPattern>\\d{2}</nationalNumberPattern></standardRate>"
|
||||
. " <premiumRate><nationalNumberPattern>\\d{3}</nationalNumberPattern></premiumRate>"
|
||||
. " <shortCode><nationalNumberPattern>\\d{4}</nationalNumberPattern></shortCode>"
|
||||
. " <carrierSpecific>"
|
||||
. " <nationalNumberPattern>\\d{5}</nationalNumberPattern>"
|
||||
. " </carrierSpecific>"
|
||||
. "</territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::setRelevantDescPatterns($metadata, $territoryElement, false /* liteBuild */, true /* isShortNumberMetadata */);
|
||||
$this->assertEquals("\\d{1}", $metadata->getTollFree()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{2}", $metadata->getStandardRate()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{3}", $metadata->getPremiumRate()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{4}", $metadata->getShortCode()->getNationalNumberPattern());
|
||||
$this->assertEquals("\\d{5}", $metadata->getCarrierSpecific()->getNationalNumberPattern());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Multiple elements with type fixedLine found.
|
||||
*/
|
||||
public function testSetRelevantDescPatternsThrowsErrorIfTypePresentMultipleTimes()
|
||||
{
|
||||
$xmlInput = "<territory countryCode=\"33\">"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{6}</nationalNumberPattern></fixedLine>"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{6}</nationalNumberPattern></fixedLine>"
|
||||
. "</territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = new PhoneMetadata();
|
||||
BuildMetadataFromXml::setRelevantDescPatterns($metadata, $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */);
|
||||
}
|
||||
|
||||
public function testAlternateFormatsOmitsDescPatterns()
|
||||
{
|
||||
$xmlInput = "<territory countryCode=\"33\">"
|
||||
. " <availableFormats>"
|
||||
. " <numberFormat pattern=\"(1)(\\d{3})\">"
|
||||
. " <leadingDigits>1</leadingDigits>"
|
||||
. ' <format>$1</format>'
|
||||
. " </numberFormat>"
|
||||
. " </availableFormats>"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{1}</nationalNumberPattern></fixedLine>"
|
||||
. " <shortCode><nationalNumberPattern>\\d{2}</nationalNumberPattern></shortCode>"
|
||||
. "</territory>";
|
||||
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = BuildMetadataFromXml::loadCountryMetadata('FR', $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */, true /* isAlternateFormatsMetadata */);
|
||||
$this->assertEquals('(1)(\\d{3})', $metadata->getNumberFormat(0)->getPattern());
|
||||
$this->assertEquals('1', $metadata->getNumberFormat(0)->getLeadingDigitsPattern(0));
|
||||
$this->assertEquals('$1', $metadata->getNumberFormat(0)->getFormat());
|
||||
$this->assertNull($metadata->getFixedLine());
|
||||
$this->assertNull($metadata->getShortCode());
|
||||
}
|
||||
|
||||
public function testNationalPrefixRulesSetCorrectly()
|
||||
{
|
||||
$xmlInput = "<territory countryCode=\"33\" nationalPrefix=\"0\""
|
||||
. ' nationalPrefixFormattingRule="$NP$FG">'
|
||||
. " <availableFormats>"
|
||||
. " <numberFormat pattern=\"(1)(\\d{3})\" nationalPrefixOptionalWhenFormatting=\"true\">"
|
||||
. " <leadingDigits>1</leadingDigits>"
|
||||
. ' <format>$1</format>'
|
||||
. " </numberFormat>"
|
||||
. " <numberFormat pattern=\"(\\d{3})\" nationalPrefixOptionalWhenFormatting=\"false\">"
|
||||
. " <leadingDigits>2</leadingDigits>"
|
||||
. ' <format>$1</format>'
|
||||
. " </numberFormat>"
|
||||
. " </availableFormats>"
|
||||
. " <fixedLine><nationalNumberPattern>\\d{1}</nationalNumberPattern></fixedLine>"
|
||||
. "</territory>";
|
||||
$territoryElement = $this->parseXMLString($xmlInput);
|
||||
$metadata = BuildMetadataFromXml::loadCountryMetadata('FR', $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */, true /* isAlternateFormatsMetadata */);
|
||||
$this->assertTrue($metadata->getNumberFormat(0)->isNationalPrefixOptionalWhenFormatting());
|
||||
// This is inherited from the territory, with $NP replaced by the actual national prefix, and
|
||||
// $FG replaced with $1.
|
||||
$this->assertEquals("0$1", $metadata->getNumberFormat(0)->getNationalPrefixFormattingRule());
|
||||
// Here it is explicitly set to false.
|
||||
$this->assertFalse($metadata->getNumberFormat(1)->isNationalPrefixOptionalWhenFormatting());
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElement_PossibleLengthsSetCorrectly()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
// The number lengths set for the general description must be a super-set of those in the
|
||||
// element being parsed.
|
||||
$generalDesc->setPossibleLength(array(4, 6, 7, 13));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
// Sorting will be done when parsing.
|
||||
. " <possibleLengths national=\"13,4\" localOnly=\"6\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* no liteBuild */);
|
||||
$possibleLength = $phoneNumberDesc->getPossibleLength();
|
||||
$this->assertCount(2, $possibleLength);
|
||||
$this->assertEquals(4, $possibleLength[0]);
|
||||
$this->assertEquals(13, $possibleLength[1]);
|
||||
// We don't set the local-only lengths on child elements such as fixed-line.
|
||||
$this->assertCount(0, $phoneNumberDesc->getPossibleLengthLocalOnly());
|
||||
}
|
||||
|
||||
public function testSetPossibleLengthsGeneralDesc_BuiltFromChildElements()
|
||||
{
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"13\" localOnly=\"6\"/>"
|
||||
. "</fixedLine>"
|
||||
. "<mobile>"
|
||||
. " <possibleLengths national=\"15\" localOnly=\"7,13\"/>"
|
||||
. "</mobile>"
|
||||
. "<tollFree>"
|
||||
. " <possibleLengths national=\"15\"/>"
|
||||
. "</tollFree>"
|
||||
. "</territory>");
|
||||
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
BuildMetadataFromXml::setPossibleLengthsGeneralDesc($generalDesc, 'someId', $territoryElement, false /* not short-number metadata */);
|
||||
|
||||
$possibleLength = $generalDesc->getPossibleLength();
|
||||
$this->assertCount(2, $possibleLength);
|
||||
$this->assertEquals(13, $possibleLength[0]);
|
||||
// 15 is present twice in the input in different sections, but only once in the output.
|
||||
$this->assertEquals(15, $possibleLength[1]);
|
||||
$possibleLengthLocalOnly = $generalDesc->getPossibleLengthLocalOnly();
|
||||
$this->assertCount(2, $possibleLengthLocalOnly);
|
||||
$this->assertEquals(6, $possibleLengthLocalOnly[0]);
|
||||
$this->assertEquals(7, $possibleLengthLocalOnly[1]);
|
||||
// 13 is skipped as a "local only" length, since it is also present as a normal length.
|
||||
}
|
||||
|
||||
public function testSetPossibleLengthsGeneralDesc_IgnoresNoIntlDialling()
|
||||
{
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"13\"/>"
|
||||
. "</fixedLine>"
|
||||
. "<noInternationalDialling>"
|
||||
. " <possibleLengths national=\"15\"/>"
|
||||
. "</noInternationalDialling>"
|
||||
. "</territory>");
|
||||
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
BuildMetadataFromXml::setPossibleLengthsGeneralDesc($generalDesc, 'someId', $territoryElement, false /* not short-number metadata */);
|
||||
|
||||
$possibleLength = $generalDesc->getPossibleLength();
|
||||
$this->assertCount(1, $possibleLength);
|
||||
$this->assertEquals(13, $possibleLength[0]);
|
||||
// 15 is skipped because noInternationalDialling should not contribute to the general lengths;
|
||||
// it isn't a particular "type" of number per se, it is a property that different types may
|
||||
// have.
|
||||
}
|
||||
|
||||
public function testSetPossibleLengthsGeneralDesc_ShortNumberMetadata()
|
||||
{
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<shortCode>"
|
||||
. " <possibleLengths national=\"6,13\"/>"
|
||||
. "</shortCode>"
|
||||
. "<carrierSpecific>"
|
||||
. " <possibleLengths national=\"7,13,15\"/>"
|
||||
. "</carrierSpecific>"
|
||||
. "<tollFree>"
|
||||
. " <possibleLengths national=\"15\"/>"
|
||||
. "</tollFree>"
|
||||
. "</territory>");
|
||||
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
BuildMetadataFromXml::setPossibleLengthsGeneralDesc($generalDesc, 'someId', $territoryElement, true /* short-number metadata */);
|
||||
|
||||
// All elements other than shortCode are ignored when creating the general desc.
|
||||
$possibleLength = $generalDesc->getPossibleLength();
|
||||
$this->assertCount(2, $possibleLength);
|
||||
$this->assertEquals(6, $possibleLength[0]);
|
||||
$this->assertEquals(13, $possibleLength[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Found local-only lengths in short-number metadata
|
||||
*/
|
||||
public function testSetPossibleLengthsGeneralDesc_ShortNumberMetadataErrorsOnLocalLengths()
|
||||
{
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<shortCode>"
|
||||
. " <possibleLengths national=\"13\" localOnly=\"6\"/>"
|
||||
. "</shortCode>"
|
||||
. "</territory>");
|
||||
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
BuildMetadataFromXml::setPossibleLengthsGeneralDesc($generalDesc, 'someId', $territoryElement, true /* short-number metadata */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Duplicate length element found (6) in possibleLength string 6,6
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorDuplicates()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(6));
|
||||
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<mobile>"
|
||||
. " <possibleLengths national=\"6,6\"/>"
|
||||
. "</mobile>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'mobile', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Possible length(s) found specified as a normal and local-only length: [6]
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorDuplicatesOneLocal()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(6));
|
||||
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<mobile>"
|
||||
. " <possibleLengths national=\"6\" localOnly=\"6\"/>"
|
||||
. "</mobile>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'mobile', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Out-of-range possible length
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorUncoveredLengths()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<noInternationalDialling>"
|
||||
// Sorting will be done when parsing.
|
||||
. " <possibleLengths national=\"6,7,4\"/>"
|
||||
. "</noInternationalDialling>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'noInternationalDialling', false /* not light build */);
|
||||
}
|
||||
|
||||
public function testProcessPhoneNumberDescElement_SameAsParent()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
// The number lengths set for the general description must be a super-set of those in the
|
||||
// element being parsed.
|
||||
$generalDesc->setPossibleLength(array(4, 6, 7));
|
||||
$generalDesc->setPossibleLengthLocalOnly(array(2));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
// Sorting will be done when parsing.
|
||||
. " <possibleLengths national=\"6,7,4\" localOnly=\"2\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
$phoneNumberDesc = BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
|
||||
// No possible lengths should be present, because they match the general description.
|
||||
$this->assertCount(0, $phoneNumberDesc->getPossibleLength());
|
||||
$this->assertCount(0, $phoneNumberDesc->getPossibleLengthLocalOnly());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage For input string "4d"
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_InvalidNumber()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"4d\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Found possible lengths specified at general desc: this should be derived from child elements. Affected country: FR
|
||||
*/
|
||||
public function testLoadCountryMetadata_GeneralDescHasNumberLengthsSet()
|
||||
{
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<generalDesc>"
|
||||
// This shouldn't be set, the possible lengths should be derived for generalDesc.
|
||||
. " <possibleLengths national=\"4\"/>"
|
||||
. "</generalDesc>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"4\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::loadCountryMetadata('FR', $territoryElement, false /* liteBuild */, false /* isShortNumberMetadata */, false /* isAlternateFormatsMetadata */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Empty possibleLength string found.
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorEmptyPossibleLengthStringAttribute()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Missing end of range character in possible length string [4,7].
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorRangeSpecifiedWithComma()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"[4,7]\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Missing end of range character in possible length string [4-.
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorIncompleteRange()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"[4-\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Ranges must have exactly one - character: missing for [4:10].
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorNoDashInRange()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"[4:10]\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage The first number in a range should be two or more digits lower than the second. Culprit possibleLength string: [10-10]
|
||||
*/
|
||||
public function testProcessPhoneNumberDescElement_ErrorRangeIsNotFromMinToMax()
|
||||
{
|
||||
$generalDesc = new PhoneNumberDesc();
|
||||
$generalDesc->setPossibleLength(array(4));
|
||||
$territoryElement = $this->parseXMLString("<territory>"
|
||||
. "<fixedLine>"
|
||||
. " <possibleLengths national=\"[10-10]\"/>"
|
||||
. "</fixedLine>"
|
||||
. "</territory>");
|
||||
|
||||
BuildMetadataFromXml::processPhoneNumberDescElement($generalDesc, $territoryElement, 'fixedLine', false /* not light build */);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\buildtools;
|
||||
|
||||
|
||||
use libphonenumber\buildtools\GeneratePhonePrefixData;
|
||||
|
||||
class GeneratePhonePrefixDataTest extends \PHPUnit_Framework_TestCase
|
||||
@@ -51,6 +50,4 @@ class GeneratePhonePrefixDataTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertContains("zh_Hans", $languagesForCN);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -77,10 +77,6 @@ class PhoneNumberToCarrierMapperTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
$this->carrierMapper = PhoneNumberToCarrierMapper::getInstance(self::TEST_META_DATA_FILE_PREFIX);
|
||||
}
|
||||
|
||||
@@ -138,6 +134,5 @@ class PhoneNumberToCarrierMapperTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals("", $this->carrierMapper->getNameForNumber(self::$UK_INVALID_NUMBER, "en"));
|
||||
$this->assertEquals("", $this->carrierMapper->getNameForNumber(self::$AO_INVALID_NUMBER, "en"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,6 @@ class ExampleNumbersTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCanBeInternationallyDialled($regionCode)
|
||||
{
|
||||
|
||||
$exampleNumber = null;
|
||||
/** @var \libphonenumber\PhoneNumberDesc $desc */
|
||||
$desc = $this->phoneNumberUtil->getMetadataForRegion($regionCode)->getNoInternationalDialling();
|
||||
@@ -200,7 +199,6 @@ class ExampleNumbersTest extends \PHPUnit_Framework_TestCase
|
||||
$exampleNumber = $this->phoneNumberUtil->parse($desc->getExampleNumber(), $regionCode);
|
||||
}
|
||||
} catch (NumberParseException $e) {
|
||||
|
||||
}
|
||||
|
||||
if ($exampleNumber !== null && $this->phoneNumberUtil->canBeInternationallyDialled($exampleNumber)) {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\core;
|
||||
|
||||
|
||||
use libphonenumber\DefaultMetadataLoader;
|
||||
use libphonenumber\MultiFileMetadataSourceImpl;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
|
||||
@@ -16,10 +16,8 @@ use libphonenumber\PhoneNumberUtil;
|
||||
use libphonenumber\RegionCode;
|
||||
use libphonenumber\ValidationResult;
|
||||
|
||||
|
||||
class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
const TEST_META_DATA_FILE_PREFIX = "../../../Tests/libphonenumber/Tests/core/data/PhoneNumberMetadataForTesting";
|
||||
private static $bsNumber = null;
|
||||
private static $internationalTollFree = null;
|
||||
@@ -151,8 +149,7 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertGreaterThan(0, count($globalNetworkCallingCodes));
|
||||
|
||||
foreach ($globalNetworkCallingCodes as $callingCode)
|
||||
{
|
||||
foreach ($globalNetworkCallingCodes as $callingCode) {
|
||||
$this->assertGreaterThan(0, $callingCode);
|
||||
$this->assertEquals(RegionCode::UN001, $this->phoneUtil->getRegionCodeForCountryCode($callingCode));
|
||||
}
|
||||
@@ -178,6 +175,11 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals("\\d{7}(?:\\d{3})?", $metadata->getGeneralDesc()->getPossibleNumberPattern());
|
||||
$this->assertTrue($metadata->getGeneralDesc()->exactlySameAs($metadata->getFixedLine()));
|
||||
$this->assertEquals("\\d{10}", $metadata->getTollFree()->getPossibleNumberPattern());
|
||||
$possibleLength = $metadata->getGeneralDesc()->getPossibleLength();
|
||||
$this->assertEquals(10, $possibleLength[0]);
|
||||
// Possible lengths are the same as the general description, so aren't stored separately in the
|
||||
// toll free element as well.
|
||||
$this->assertCount(0, $metadata->getTollFree()->getPossibleLength());
|
||||
$this->assertEquals("900\\d{7}", $metadata->getPremiumRate()->getNationalNumberPattern());
|
||||
// No shared-cost data is available, so it should be initialised to "NA".
|
||||
$this->assertEquals("NA", $metadata->getSharedCost()->getNationalNumberPattern());
|
||||
@@ -196,8 +198,15 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals("900", $metadata->getNumberFormat(5)->getLeadingDigitsPattern(0));
|
||||
$this->assertEquals("(\\d{3})(\\d{3,4})(\\d{4})", $metadata->getNumberFormat(5)->getPattern());
|
||||
$this->assertEquals("$1 $2 $3", $metadata->getNumberFormat(5)->getFormat());
|
||||
$this->assertCount(2, $metadata->getGeneralDesc()->getPossibleLengthLocalOnly());
|
||||
$this->assertCount(8, $metadata->getGeneralDesc()->getPossibleLength());
|
||||
// Nothing is present for fixed-line, since it is the same as the general desc, so for
|
||||
// efficiency reasons we don't store an extra value.
|
||||
$this->assertCount(0, $metadata->getFixedLine()->getPossibleLength());
|
||||
$this->assertCount(2, $metadata->getMobile()->getPossibleLength());
|
||||
|
||||
$this->assertEquals(
|
||||
"(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:[1-9]\\d|0[2-9]))\\d{1,8}",
|
||||
"(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:0[2-9]|[1-9]\\d))\\d{1,8}",
|
||||
$metadata->getFixedLine()->getNationalNumberPattern()
|
||||
);
|
||||
$this->assertEquals("\\d{2,14}", $metadata->getFixedLine()->getPossibleNumberPattern());
|
||||
@@ -262,12 +271,19 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
// Google London, which has area code "20".
|
||||
$this->assertEquals(2, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$gbNumber));
|
||||
|
||||
// A mobile number in the UK does not have an area code (by default, mobile numbers do not,
|
||||
// unless they have been added to our list of exceptions).
|
||||
$this->assertEquals(0, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$gbMobile));
|
||||
|
||||
// A UK mobile phone, which has no area code.
|
||||
$this->assertEquals(0, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$gbMobile));
|
||||
|
||||
// Google Buenos Aires, which has area code "11".
|
||||
$this->assertEquals(2, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$arNumber));
|
||||
|
||||
// A mobile number in Argentina also has an area code.
|
||||
$this->assertEquals(3, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$arMobile));
|
||||
|
||||
// Google Sydney, which has area code "2".
|
||||
$this->assertEquals(1, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$auNumber));
|
||||
|
||||
@@ -282,6 +298,12 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
// An international toll free number, which has no area code.
|
||||
$this->assertEquals(0, $this->phoneUtil->getLengthOfGeographicalAreaCode(self::$internationalTollFree));
|
||||
|
||||
// A mobile number from China is geographical, but does not have an area code.
|
||||
$cnMobile = new PhoneNumber();
|
||||
$cnMobile->setCountryCode(86)->setNationalNumber('18912341234');
|
||||
|
||||
$this->assertEquals(0, $this->phoneUtil->getLengthOfGeographicalAreaCode($cnMobile));
|
||||
}
|
||||
|
||||
public function testGetLengthOfNationalDestinationCode()
|
||||
@@ -320,6 +342,13 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
// An international toll free number, which has NDC "1234".
|
||||
$this->assertEquals(4, $this->phoneUtil->getLengthOfNationalDestinationCode(self::$internationalTollFree));
|
||||
|
||||
// A mobile number from China is geographical, but does not have an area code: however it still
|
||||
// can be considered to have a national destination code.
|
||||
$cnMobile= new PhoneNumber();
|
||||
$cnMobile->setCountryCode(86)->setNationalNumber('18912341234');
|
||||
|
||||
$this->assertEquals(3, $this->phoneUtil->getLengthOfNationalDestinationCode($cnMobile));
|
||||
}
|
||||
|
||||
public function testGetCountryMobileToken()
|
||||
@@ -1769,7 +1798,6 @@ class PhoneNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($this->phoneUtil->isPossibleNumber("1 3000", RegionCode::GB));
|
||||
$this->assertFalse($this->phoneUtil->isPossibleNumber("+44 300", RegionCode::GB));
|
||||
$this->assertFalse($this->phoneUtil->isPossibleNumber("+800 1234 5678 9", RegionCode::UN001));
|
||||
|
||||
}
|
||||
|
||||
public function testTruncateTooLongNumber()
|
||||
|
||||
@@ -153,5 +153,4 @@ class ShortNumberUtilTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($this->shortUtil->isEmergencyNumber("01312345", RegionCode::ZW));
|
||||
$this->assertFalse($this->shortUtil->isEmergencyNumber("0711234567", RegionCode::ZW));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,84 +11,149 @@ return array (
|
||||
'NationalNumberPattern' => '\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{8}',
|
||||
'ExampleNumber' => '12345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
1 => '8',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'ExampleNumber' => '12345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'ExampleNumber' => '12345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{8}',
|
||||
'ExampleNumber' => '12345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '8',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => '001',
|
||||
'countryCode' => 800,
|
||||
@@ -105,6 +170,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -11,84 +11,149 @@ return array (
|
||||
'NationalNumberPattern' => '\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '123456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
1 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'ExampleNumber' => '123456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'ExampleNumber' => '123456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '-1',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '123456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => '001',
|
||||
'countryCode' => 979,
|
||||
@@ -105,6 +170,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'AD',
|
||||
'countryCode' => 376,
|
||||
|
||||
@@ -10,82 +10,143 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '600\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '600123456',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'AE',
|
||||
'countryCode' => 971,
|
||||
|
||||
@@ -10,83 +10,145 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[29]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '2\\d(?:[26-9]\\d|\\d[26-9])\\d{5}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '222123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '9[1-3]\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '923123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'AO',
|
||||
'countryCode' => 244,
|
||||
@@ -105,6 +167,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,81 +10,155 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-3689]\\d{9,10}',
|
||||
'PossibleNumberPattern' => '\\d{6,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 6,
|
||||
1 => 7,
|
||||
2 => 8,
|
||||
3 => 9,
|
||||
4 => 10,
|
||||
5 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-3]\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{6,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 6,
|
||||
1 => 7,
|
||||
2 => 8,
|
||||
3 => 9,
|
||||
4 => 10,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '9\\d{10}|[1-3]\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '6(0\\d|10)\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'AR',
|
||||
'countryCode' => 54,
|
||||
@@ -105,6 +179,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +191,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -127,6 +203,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -138,6 +215,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '0$1 $CC',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -149,6 +227,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
@@ -163,6 +242,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -174,6 +254,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -183,6 +264,9 @@ return array (
|
||||
array (
|
||||
0 => '911',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -192,6 +276,9 @@ return array (
|
||||
array (
|
||||
0 => '9(?:1[02-9]|[23])',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -203,6 +290,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'mainCountryForCode' => false,
|
||||
|
||||
@@ -10,81 +10,146 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-578]\\d{4,14}',
|
||||
'PossibleNumberPattern' => '\\d{5,15}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
1 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[2378]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '4\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1800\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '190[0126]\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'AU',
|
||||
'countryCode' => 61,
|
||||
@@ -105,6 +170,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +182,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'BB',
|
||||
'countryCode' => 1,
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'BR',
|
||||
'countryCode' => 55,
|
||||
|
||||
@@ -10,81 +10,142 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '(242|8(00|66|77|88)|900)\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{7,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
0 => '7',
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3-57]|9[2-5])|4(?:2[237]|51|64|77)|502|636|702)\\d{4}',
|
||||
'PossibleNumberPattern' => '\\d{7,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '242(357|359|457|557)\\d{4}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '8(00|66|77|88)\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '900\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'BS',
|
||||
'countryCode' => 1,
|
||||
|
||||
@@ -10,82 +10,144 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{5}',
|
||||
'PossibleNumberPattern' => '\\d{6}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '6',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{5}',
|
||||
'PossibleNumberPattern' => '\\d{6}',
|
||||
'ExampleNumber' => '112345',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{5}',
|
||||
'PossibleNumberPattern' => '\\d{6}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'BY',
|
||||
'countryCode' => 375,
|
||||
@@ -105,6 +167,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '8 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +179,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '8$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -127,6 +191,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '8 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'CA',
|
||||
'countryCode' => 1,
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'CC',
|
||||
'countryCode' => 61,
|
||||
|
||||
@@ -8,82 +8,154 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{7,10}',
|
||||
'PossibleNumberPattern' => '\\d{4,12}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[2-9]\\d{10}',
|
||||
'PossibleNumberPattern' => '\\d{11}',
|
||||
'ExampleNumber' => '91234567',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1(?:[38]\\d|4[57]|5[0-35-9]|7[0136-8])\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{11}',
|
||||
'ExampleNumber' => '13123456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'CN',
|
||||
'countryCode' => 86,
|
||||
'internationalPrefix' => '',
|
||||
'sameMobileAndFixedLinePattern' => true,
|
||||
'nationalPrefix' => '0',
|
||||
'nationalPrefixForParsing' => '0',
|
||||
'sameMobileAndFixedLinePattern' => false,
|
||||
'numberFormat' =>
|
||||
array (
|
||||
0 =>
|
||||
@@ -94,15 +166,23 @@ return array (
|
||||
array (
|
||||
0 => '[3-9]',
|
||||
1 => '[3-9]\\d{2}[19]',
|
||||
2 => '
|
||||
[3-9]\\d{2}(?:
|
||||
10|
|
||||
95
|
||||
)
|
||||
',
|
||||
2 => '[3-9]\\d{2}(?:10|95)',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '$CC $1',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'pattern' => '(\\d{3})(\\d{8})',
|
||||
'format' => '$1 $2',
|
||||
'leadingDigitsPatterns' =>
|
||||
array (
|
||||
0 => '1',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '$1',
|
||||
'domesticCarrierCodeFormattingRule' => '$CC $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'CX',
|
||||
'countryCode' => 61,
|
||||
|
||||
@@ -10,82 +10,156 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '\\d{4,14}',
|
||||
'PossibleNumberPattern' => '\\d{2,14}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 4,
|
||||
1 => 5,
|
||||
2 => 6,
|
||||
3 => 7,
|
||||
4 => 8,
|
||||
5 => 9,
|
||||
6 => 10,
|
||||
7 => 11,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
0 => '2',
|
||||
1 => '3',
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:[1-9]\\d|0[2-9]))\\d{1,8}',
|
||||
'NationalNumberPattern' => '(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:0[2-9]|[1-9]\\d))\\d{1,8}',
|
||||
'PossibleNumberPattern' => '\\d{2,14}',
|
||||
'ExampleNumber' => '30123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1(5\\d{9}|7\\d{8}|6[02]\\d{8}|63\\d{7})',
|
||||
'PossibleNumberPattern' => '\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '800\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '900([135]\\d{6}|9\\d{7})',
|
||||
'PossibleNumberPattern' => '\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'DE',
|
||||
'countryCode' => 49,
|
||||
@@ -105,6 +179,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +191,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -128,6 +204,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -140,6 +217,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -151,6 +229,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
@@ -162,6 +241,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,81 +10,142 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '3\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{7}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '3\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{7}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '3\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{7}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'FR',
|
||||
'countryCode' => 33,
|
||||
@@ -104,6 +165,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,81 +10,138 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '\\d{10}',
|
||||
'PossibleNumberPattern' => '\\d{6,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
0 => '6',
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-6]\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{6,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '7[1-57-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '9[018]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '8(?:4[3-5]|7[0-2])\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '70\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '56\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '76\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'GB',
|
||||
'countryCode' => 44,
|
||||
@@ -104,6 +161,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '(0$1)',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -115,6 +173,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '(0$1)',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -126,6 +185,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '(0$1)',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -137,6 +197,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '(0$1)',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'GG',
|
||||
'countryCode' => 44,
|
||||
|
||||
@@ -10,81 +10,143 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '30\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '30\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '30\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'HU',
|
||||
'countryCode' => 36,
|
||||
|
||||
@@ -10,81 +10,152 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[0389]\\d{5,10}',
|
||||
'PossibleNumberPattern' => '\\d{6,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '6',
|
||||
1 => '9',
|
||||
2 => '10',
|
||||
3 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '0\\d{9,10}',
|
||||
'PossibleNumberPattern' => '\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '3\\d{8,9}',
|
||||
'PossibleNumberPattern' => '\\d{9,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
1 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80(?:0\\d{6}|3\\d{3})',
|
||||
'PossibleNumberPattern' => '\\d{6,9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '6',
|
||||
1 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '89(?:2\\d{3}|9\\d{6})',
|
||||
'PossibleNumberPattern' => '\\d{6,9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '6',
|
||||
1 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'IT',
|
||||
'countryCode' => 39,
|
||||
@@ -102,6 +173,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -113,6 +185,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -124,6 +197,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -135,6 +209,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,82 +10,151 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '07\\d{5}|[1-357-9]\\d{3,10}',
|
||||
'PossibleNumberPattern' => '\\d{4,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 4,
|
||||
1 => 5,
|
||||
2 => 6,
|
||||
3 => 7,
|
||||
4 => 8,
|
||||
5 => 9,
|
||||
6 => 10,
|
||||
7 => 11,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '07\\d{5}|[1-357-9]\\d{3,10}',
|
||||
'PossibleNumberPattern' => '\\d{4,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '07\\d{5}|[1-357-9]\\d{3,10}',
|
||||
'PossibleNumberPattern' => '\\d{4,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '0777[01]\\d{2}',
|
||||
'PossibleNumberPattern' => '\\d{7}',
|
||||
'ExampleNumber' => '0777012',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '7',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[23]\\d{3}',
|
||||
'PossibleNumberPattern' => '\\d{4}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '4',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'JP',
|
||||
'countryCode' => 81,
|
||||
@@ -105,6 +174,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +186,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -129,6 +200,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -143,6 +215,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -154,6 +227,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
@@ -165,6 +239,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
@@ -176,6 +251,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,87 +10,157 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-7]\\d{3,9}|8\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{4,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 4,
|
||||
1 => 5,
|
||||
2 => 6,
|
||||
3 => 7,
|
||||
4 => 8,
|
||||
5 => 9,
|
||||
6 => 10,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\\d{2,3}|[2-9]\\d{6,7})',
|
||||
'PossibleNumberPattern' => '\\d{4,10}',
|
||||
'ExampleNumber' => '22123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1[0-25-9]\\d{7,8}',
|
||||
'PossibleNumberPattern' => '\\d{9,10}',
|
||||
'ExampleNumber' => '1023456789',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
1 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '801234567',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '60[2-9]\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '602345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '50\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'ExampleNumber' => '5012345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '70\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'ExampleNumber' => '7012345678',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'KR',
|
||||
'countryCode' => 82,
|
||||
@@ -111,6 +181,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -123,6 +194,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -135,6 +207,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -147,6 +220,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -158,6 +232,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
@@ -169,6 +244,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
@@ -181,6 +257,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
@@ -193,6 +270,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
@@ -205,6 +283,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
@@ -217,6 +296,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
@@ -230,6 +310,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
@@ -243,6 +324,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,81 +10,147 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{9,10}',
|
||||
'PossibleNumberPattern' => '\\d{7,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
0 => '7',
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[2-9]\\d{9}',
|
||||
'PossibleNumberPattern' => '\\d{7,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1\\d{10}',
|
||||
'PossibleNumberPattern' => '\\d{11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '800\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '900\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'MX',
|
||||
'countryCode' => 52,
|
||||
@@ -105,6 +171,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -116,6 +183,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -127,6 +195,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -138,6 +207,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -149,6 +219,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
@@ -163,6 +234,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -174,6 +246,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -185,6 +258,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '01 $1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
@@ -194,6 +268,9 @@ return array (
|
||||
array (
|
||||
0 => '1(?:33|55|81)',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
@@ -203,6 +280,9 @@ return array (
|
||||
array (
|
||||
0 => '1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])',
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'mainCountryForCode' => false,
|
||||
|
||||
@@ -8,86 +8,155 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '
|
||||
[289]\\d{7,9}|
|
||||
[3-7]\\d{7}
|
||||
',
|
||||
'NationalNumberPattern' => '[289]\\d{7,9}|[3-7]\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{7,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '7',
|
||||
1 => '8',
|
||||
2 => 9,
|
||||
3 => 10,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '24099\\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{7,8}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '7',
|
||||
1 => '8',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '2(?:[027]\\d{7}|9\\d{6,7}|1(?:0\\d{5,7}|[12]\\d{5,6}|[3-9]\\d{5})|4[1-9]\\d{6}|8\\d{7,8})',
|
||||
'PossibleNumberPattern' => '\\d{8,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => 8,
|
||||
1 => 9,
|
||||
2 => 10,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '800\\d{6,7}',
|
||||
'PossibleNumberPattern' => '\\d{9,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
1 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '900\\d{6,7}',
|
||||
'PossibleNumberPattern' => '\\d{9,10}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
1 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'NZ',
|
||||
'countryCode' => 64,
|
||||
@@ -107,6 +176,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -118,6 +188,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -129,6 +200,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,81 +10,141 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[1-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '(?:5[01]|6[069]|7[289]|88)\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '800\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '70\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'PL',
|
||||
'countryCode' => 48,
|
||||
@@ -103,6 +163,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -10,85 +10,145 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[268]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '262\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '262161234',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '6(?:9[23]|47)\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '692123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '801234567',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '8(?:1[01]|2[0156]|84|9[0-37-9])\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '810123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'RE',
|
||||
'countryCode' => 262,
|
||||
@@ -107,6 +167,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '0$1',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -8,77 +8,138 @@
|
||||
return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'SE',
|
||||
'countryCode' => 46,
|
||||
|
||||
@@ -9,85 +9,149 @@ return array (
|
||||
'generalDesc' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[13689]\\d{7,10}',
|
||||
'PossibleNumberPattern' => '
|
||||
\\d{8}|
|
||||
\\d{10,11}
|
||||
',
|
||||
'PossibleNumberPattern' => '\\d{8}|\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '8',
|
||||
1 => '10',
|
||||
2 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[36]\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{8}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '8',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[89]\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{8}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '8',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1?800\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10,11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
1 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '1900\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{11}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '11',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'SG',
|
||||
'countryCode' => 65,
|
||||
@@ -106,6 +170,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -117,6 +182,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
@@ -128,6 +194,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => false,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
|
||||
@@ -11,86 +11,145 @@ return array (
|
||||
'NationalNumberPattern' => '[13-689]\\d{9}|2[0-35-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{7}(?:\\d{3})?',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '10',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[13-689]\\d{9}|2[0-35-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{7}(?:\\d{3})?',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '[13-689]\\d{9}|2[0-35-9]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{7}(?:\\d{3})?',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '8(?:00|66|77|88)\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '900\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '800\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{10}',
|
||||
'ExampleNumber' => '1234567890',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'US',
|
||||
'countryCode' => 1,
|
||||
@@ -110,6 +169,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
@@ -120,6 +180,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
),
|
||||
'intlNumberFormat' =>
|
||||
@@ -133,6 +194,7 @@ return array (
|
||||
),
|
||||
'nationalPrefixFormattingRule' => '',
|
||||
'domesticCarrierCodeFormattingRule' => '',
|
||||
'nationalPrefixOptionalWhenFormatting' => true,
|
||||
),
|
||||
),
|
||||
'mainCountryForCode' => true,
|
||||
|
||||
@@ -10,84 +10,145 @@ return array (
|
||||
array (
|
||||
'NationalNumberPattern' => '[268]\\d{8}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => '9',
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'fixedLine' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '2696[0-4]\\d{4}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '269601234',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'mobile' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '639\\d{6}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '639123456',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'tollFree' =>
|
||||
array (
|
||||
'NationalNumberPattern' => '80\\d{7}',
|
||||
'PossibleNumberPattern' => '\\d{9}',
|
||||
'ExampleNumber' => '801234567',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'premiumRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'sharedCost' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'personalNumber' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voip' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'pager' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'uan' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'emergency' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'voicemail' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'shortCode' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'standardRate' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
),
|
||||
'carrierSpecific' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'noInternationalDialling' =>
|
||||
array (
|
||||
'NationalNumberPattern' => 'NA',
|
||||
'PossibleNumberPattern' => 'NA',
|
||||
'PossibleLength' =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
'PossibleLengthLocalOnly' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
'id' => 'YT',
|
||||
'countryCode' => 262,
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace libphonenumber\Tests\geocoding;
|
||||
use libphonenumber\geocoding\PhoneNumberOfflineGeocoder;
|
||||
use libphonenumber\PhoneNumber;
|
||||
|
||||
|
||||
class PhoneNumberOfflineGeocoderTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
const TEST_META_DATA_FILE_PREFIX = "/../../../Tests/libphonenumber/Tests/prefixmapper/data/";
|
||||
@@ -13,6 +12,7 @@ class PhoneNumberOfflineGeocoderTest extends \PHPUnit_Framework_TestCase
|
||||
private static $KO_Number2;
|
||||
private static $KO_Number3;
|
||||
private static $KO_InvalidNumber;
|
||||
private static $KO_Mobile;
|
||||
private static $US_Number1;
|
||||
private static $US_Number2;
|
||||
private static $US_Number3;
|
||||
@@ -43,6 +43,9 @@ class PhoneNumberOfflineGeocoderTest extends \PHPUnit_Framework_TestCase
|
||||
self::$KO_InvalidNumber = new PhoneNumber();
|
||||
self::$KO_InvalidNumber->setCountryCode(82)->setNationalNumber(1234);
|
||||
|
||||
self::$KO_Mobile = new PhoneNumber();
|
||||
self::$KO_Mobile->setCountryCode(82)->setNationalNumber(101234567);
|
||||
|
||||
self::$US_Number1 = new PhoneNumber();
|
||||
self::$US_Number1->setCountryCode(1)->setNationalNumber(6502530000);
|
||||
|
||||
@@ -75,15 +78,10 @@ class PhoneNumberOfflineGeocoderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
self::$internationalTollFree = new PhoneNumber();
|
||||
self::$internationalTollFree->setCountryCode(800)->setNationalNumber(12345678);
|
||||
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if(!extension_loaded('intl')) {
|
||||
$this->markTestSkipped('The intl extension must be installed');
|
||||
}
|
||||
|
||||
PhoneNumberOfflineGeocoder::resetInstance();
|
||||
$this->geocoder = PhoneNumberOfflineGeocoder::getInstance(self::TEST_META_DATA_FILE_PREFIX);
|
||||
}
|
||||
@@ -198,4 +196,10 @@ class PhoneNumberOfflineGeocoderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals("", $this->geocoder->getDescriptionForNumber(self::$KO_InvalidNumber, "en"));
|
||||
$this->assertEquals("", $this->geocoder->getDescriptionForNumber(self::$US_InvalidNumber, "en"));
|
||||
}
|
||||
|
||||
public function testGetDescriptionForNonGeographicalNumberWithGeocodingPrefix()
|
||||
{
|
||||
// We have a geocoding prefix, but we shouldn't use it since this is not geographical.
|
||||
$this->assertEquals("South Korea", $this->geocoder->getDescriptionForNumber(self::$KO_Mobile, 'en'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace libphonenumber\Tests\prefixmapper;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use libphonenumber\prefixmapper\PrefixFileReader;
|
||||
|
||||
|
||||
class PrefixFileReaderTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
const TEST_META_DATA_FILE_PREFIX = "/data/";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
return array (
|
||||
8210 => 'Mobile prefix, should not be geocoded.',
|
||||
822 => 'Seoul',
|
||||
8231 => 'Gyeonggi',
|
||||
8232 => 'Incheon',
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace libphonenumber\Tests\timezone;
|
||||
|
||||
|
||||
use libphonenumber\PhoneNumber;
|
||||
use libphonenumber\prefixmapper\PrefixTimeZonesMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user