PHP 클래스 libphonenumber\prefixmapper\PrefixFileReader

파일 보기 프로젝트 열기: giggsey/libphonenumber-for-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$availablePhonePrefixMaps array A mapping from countryCallingCode_lang to the corresponding phone prefix map that has been loaded.
$mappingFileProvider 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

공개 메소드들

메소드 설명
__construct ( $phonePrefixDataDirectory )
getDescriptionForNumber ( PhoneNumber $number, string $language, string $script, string $region ) : string Returns a text description in the given language for the given phone number.
getPhonePrefixDescriptions ( $prefixMapKey, $language, $script, $region ) : PhonePrefixMap | null
mayFallBackToEnglish ( $language )

보호된 메소드들

메소드 설명
loadMappingFileProvider ( )
loadPhonePrefixMapFromFile ( $fileName )

메소드 상세

__construct() 공개 메소드

public __construct ( $phonePrefixDataDirectory )

getDescriptionForNumber() 공개 메소드

Returns a text description in the given language for the given phone number.
public getDescriptionForNumber ( PhoneNumber $number, string $language, string $script, string $region ) : string
$number libphonenumber\PhoneNumber 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
리턴 string a text description in the given language for the given phone number, or an empty string if a description is not available

getPhonePrefixDescriptions() 공개 메소드

public getPhonePrefixDescriptions ( $prefixMapKey, $language, $script, $region ) : PhonePrefixMap | null
$prefixMapKey
$language
$script
$region
리턴 PhonePrefixMap | null

loadMappingFileProvider() 보호된 메소드

protected loadMappingFileProvider ( )

loadPhonePrefixMapFromFile() 보호된 메소드

protected loadPhonePrefixMapFromFile ( $fileName )

mayFallBackToEnglish() 공개 메소드

public mayFallBackToEnglish ( $language )

프로퍼티 상세

$availablePhonePrefixMaps 보호되어 있는 프로퍼티

A mapping from countryCallingCode_lang to the corresponding phone prefix map that has been loaded.
protected array $availablePhonePrefixMaps
리턴 array

$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.
protected MappingFileProvider,libphonenumber\prefixmapper $mappingFileProvider
리턴 MappingFileProvider

$phonePrefixDataDirectory 보호되어 있는 프로퍼티

protected $phonePrefixDataDirectory