PHP Class libphonenumber\prefixmapper\PrefixTimeZonesMap

显示文件 Open project: giggsey/libphonenumber-for-php Class Usage Examples

Protected Properties

Property Type Description
$phonePrefixMap

Public Methods

Method Description
__construct ( $map )
lookupCountryLevelTimeZonesForNumber ( PhoneNumber $number ) : array Returns the list of time zones {@code number}'s calling country code corresponds to.
lookupTimeZonesForNumber ( PhoneNumber $number ) : array As per {@link #lookupTimeZonesForNumber(long)}, but receives the number as a PhoneNumber instead of a long.

Protected Methods

Method Description
lookupTimeZonesForNumberKey ( $key ) : array Returns the list of time zones {@code key} corresponds to.
tokenizeRawOutputString ( $timezonesString ) : array Split {@code timezonesString} into all the time zones that are part of it.

Method Details

__construct() public method

public __construct ( $map )

lookupCountryLevelTimeZonesForNumber() public method

Returns the list of time zones {@code number}'s calling country code corresponds to.
public lookupCountryLevelTimeZonesForNumber ( PhoneNumber $number ) : array
$number libphonenumber\PhoneNumber PhoneNumber the phone number to look up
return array the list of corresponding time zones

lookupTimeZonesForNumber() public method

As per {@link #lookupTimeZonesForNumber(long)}, but receives the number as a PhoneNumber instead of a long.
public lookupTimeZonesForNumber ( PhoneNumber $number ) : array
$number libphonenumber\PhoneNumber PhoneNumber the phone number to look up
return array the list of corresponding time zones

lookupTimeZonesForNumberKey() protected method

{@code key} could be the calling country code and the full significant number of a certain number, or it could be just a phone-number prefix. For example, the full number 16502530000 (from the phone-number +1 650 253 0000) is a valid input. Also, any of its prefixes, such as 16502, is also valid.

protected lookupTimeZonesForNumberKey ( $key ) : array
$key int the key to look up
return array the list of corresponding time zones

tokenizeRawOutputString() protected method

Split {@code timezonesString} into all the time zones that are part of it.
protected tokenizeRawOutputString ( $timezonesString ) : array
$timezonesString String
return array

Property Details

$phonePrefixMap protected_oe property

protected $phonePrefixMap