|
static | selectFormatForNumber (PhoneNumber $number, $formatType, $countryMetadata) |
|
static | selectOriginalFormatForNumber (PhoneNumber $number) |
|
static | matchLeadingDigits ($phoneNumber, $leadingDigits) |
|
static | formatNationalNumber ($nationalNumber, $formatType, $countryMetadata, $format, $forceNationalPrefix) |
|
static | formatNationalNumberWithOriginalFormat (PhoneNumber $number, $format) |
|
static | getNationalPrefix ($countryMetadata, $stripNonDigits) |
|
static | getNationalPrefixFormattingRule ($format, $countryMetadata) |
|
static | getNationalPrefixOptional ($countryMetadata, $format) |
|
static | numberContainsNationalPrefix ($phoneNumber, $nationalPrefix, $countryMetadata) |
|
static | getAvailableFormats ($countryMetadata) |
|
static | _isNationalPrefixSupported ($format, $countryMetadata) |
|
static | stripNonNumbers ($string) |
|
См. определение в файле formatter.php строка 5
◆ _isNationalPrefixSupported()
static _isNationalPrefixSupported |
( |
| $format, |
|
|
| $countryMetadata ) |
|
staticprotected |
National prefix is supported by the format if:
- Format and country metadata do not have nationalPrefixFormattingRule.
- OR Format or country metadata contains nationalPrefixFormattingRule and this formatting rule contains "$NP"
- Аргументы
-
array | $format | |
array | $countryMetadata | |
- Возвращает
- {boolean}
См. определение в файле formatter.php строка 352
◆ format()
static format |
( |
PhoneNumber | $number, |
|
|
| $formatType, |
|
|
| $forceNationalPrefix = false ) |
|
static |
◆ formatNationalNumber()
static formatNationalNumber |
( |
| $nationalNumber, |
|
|
| $formatType, |
|
|
| $countryMetadata, |
|
|
| $format, |
|
|
| $forceNationalPrefix ) |
|
staticprotected |
- Аргументы
-
string | $nationalNumber | |
string | $formatType | |
array | $countryMetadata | |
mixed | $format | |
bool | $forceNationalPrefix | |
- Возвращает
- mixed
См. определение в файле formatter.php строка 199
◆ formatNationalNumberWithOriginalFormat()
static formatNationalNumberWithOriginalFormat |
( |
PhoneNumber | $number, |
|
|
| $format ) |
|
staticprotected |
◆ formatOriginal()
Formats number using original format. No digit or significant char should be added or removed.
- Аргументы
-
PhoneNumber | $number | Phone number. |
- Возвращает
- string
См. определение в файле formatter.php строка 58
◆ getAvailableFormats()
static getAvailableFormats |
( |
| $countryMetadata | ) |
|
|
staticprotected |
Returns array of available for country phone number formats.
- Аргументы
-
- Возвращает
- array
См. определение в файле formatter.php строка 324
◆ getNationalPrefix()
static getNationalPrefix |
( |
| $countryMetadata, |
|
|
| $stripNonDigits ) |
|
staticprotected |
◆ getNationalPrefixFormattingRule()
static getNationalPrefixFormattingRule |
( |
| $format, |
|
|
| $countryMetadata ) |
|
staticprotected |
◆ getNationalPrefixOptional()
static getNationalPrefixOptional |
( |
| $countryMetadata, |
|
|
| $format ) |
|
staticprotected |
◆ matchLeadingDigits()
static matchLeadingDigits |
( |
| $phoneNumber, |
|
|
| $leadingDigits ) |
|
staticprotected |
Checks that number starts with specified leading digits regex. Return array of matches if matched or false otherwise
- Аргументы
-
string | $phoneNumber | Phone number. |
string | array | $leadingDigits | Leading digits to check (one pattern or array of patterns). |
- Возвращает
- array|false
См. определение в файле formatter.php строка 167
◆ numberContainsNationalPrefix()
static numberContainsNationalPrefix |
( |
| $phoneNumber, |
|
|
| $nationalPrefix, |
|
|
| $countryMetadata ) |
|
staticprotected |
Check if rawInput, which is assumed to be in the national format, has a national prefix. The national prefix is assumed to be in digits-only form.
- Аргументы
-
string | $phoneNumber | |
string | $nationalPrefix | |
array | $countryMetadata | |
- Возвращает
- bool
См. определение в файле formatter.php строка 296
◆ selectFormatForNumber()
static selectFormatForNumber |
( |
PhoneNumber | $number, |
|
|
| $formatType, |
|
|
| $countryMetadata ) |
|
staticprotected |
◆ selectOriginalFormatForNumber()
static selectOriginalFormatForNumber |
( |
PhoneNumber | $number | ) |
|
|
staticprotected |
◆ stripNonNumbers()
static stripNonNumbers |
( |
| $string | ) |
|
|
staticprotected |