Свойство | Тип | Описание | |
---|---|---|---|
$instance | |||
$phoneUtil | |||
$prefixTimeZonesMap | |||
$unknownTimeZoneList |
Метод | Описание | |
---|---|---|
getInstance ( $mappingDir = self::MAPPING_DATA_DIRECTORY ) : |
Gets a {@link PhoneNumberToTimeZonesMapper} instance. | |
getTimeZonesForGeographicalNumber ( |
Returns a list of time zones to which a phone number belongs. | |
getTimeZonesForNumber ( |
As per {@link #getTimeZonesForGeographicalNumber(PhoneNumber)} but explicitly checks the validity of the number passed in. | |
getUnknownTimeZone ( ) : string | Returns a String with the ICU unknown time zone. |
Метод | Описание | |
---|---|---|
__construct ( $phonePrefixDataDirectory ) | ||
getCountryLevelTimeZonesforNumber ( |
Returns the list of time zones corresponding to the country calling code of {@code number}. | |
getTimeZonesForGeocodableNumber ( |
Returns a list of time zones to which a geocodable phone number belongs. | |
loadPrefixTimeZonesMapFromFile ( $path ) |
protected getCountryLevelTimeZonesforNumber ( |
||
$number | PhoneNumber the phone number to look up | |
Результат | array | the list of corresponding time zones or a single element list with the default unknown time zone if no other time zone was found |
The {@link PhoneNumberToTimeZonesMapper} is implemented as a singleton. Therefore, calling this method multiple times will only result in one instance being created.
public static getInstance ( $mappingDir = self::MAPPING_DATA_DIRECTORY ) : |
||
$mappingDir | ||
Результат | instance |
protected getTimeZonesForGeocodableNumber ( |
||
$number | The phone number for which we want to get the time zones to which it belongs | |
Результат | array | the list of correspondiing time zones or a single element list with the default unknown timezone if no other time zone was found or if the number was invalid |
This method assumes the validity of the number passed in has already been checked, and that the number is geo-localizable. We consider fixed-line and mobile numbers possible candidates for geo-localization.
public getTimeZonesForGeographicalNumber ( |
||
$number | PhoneNumber a valid phone number for which we want to get the time zones to which it belongs | |
Результат | array | a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid |
public getTimeZonesForNumber ( |
||
$number | PhoneNumber the phone number for which we want to get the time zones to which it belongs | |
Результат | array | a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid |
public static getUnknownTimeZone ( ) : string | ||
Результат | string |
protected static loadPrefixTimeZonesMapFromFile ( $path ) |
protected static PhoneNumberToTimeZonesMapper,libphonenumber $instance | ||
Результат |
protected PhoneNumberUtil,libphonenumber $phoneUtil | ||
Результат |