Property | Type | Description | |
---|---|---|---|
$availablePhonePrefixMaps | array | A mapping from countryCallingCode_lang to the corresponding phone prefix map that has been loaded. | |
$mappingFileProvider | The mappingFileProvider knows for which combination of countryCallingCode and language a phone prefix mapping file is available in the file system, so that a file can be loaded when needed. | ||
$phonePrefixDataDirectory |
Method | Description | |
---|---|---|
__construct ( $phonePrefixDataDirectory ) | ||
getDescriptionForNumber ( |
Returns a text description in the given language for the given phone number. | |
getPhonePrefixDescriptions ( $prefixMapKey, $language, $script, $region ) : |
||
mayFallBackToEnglish ( $language ) |
Method | Description | |
---|---|---|
loadMappingFileProvider ( ) | ||
loadPhonePrefixMapFromFile ( $fileName ) |
public getDescriptionForNumber ( |
||
$number | the phone number for which we want to get a text description | |
$language | string | two-letter lowercase ISO language codes as defined by ISO 639-1 |
$script | string | four-letter titlecase (the first letter is uppercase and the rest of the letters are lowercase) ISO script codes as defined in ISO 15924 |
$region | string | two-letter uppercase ISO country codes as defined by ISO 3166-1 |
return | string | a text description in the given language for the given phone number, or an empty string if a description is not available |
public getPhonePrefixDescriptions ( $prefixMapKey, $language, $script, $region ) : |
||
$prefixMapKey | ||
$language | ||
$script | ||
$region | ||
return |
protected array $availablePhonePrefixMaps | ||
return | array |
protected MappingFileProvider,libphonenumber\prefixmapper $mappingFileProvider | ||
return |