1 | <?php |
||
8 | class PrefixTimeZonesMap |
||
9 | { |
||
10 | /* |
||
11 | |||
12 | protected final PhonePrefixMap phonePrefixMap = new PhonePrefixMap(); |
||
13 | protected static final String RAW_STRING_TIMEZONES_SEPARATOR = "&"; |
||
14 | */ |
||
15 | const RAW_STRING_TIMEZONES_SEPARATOR = "&"; |
||
16 | protected $phonePrefixMap; |
||
17 | |||
18 | 1 | public function __construct($map) |
|
22 | |||
23 | /** |
||
24 | * As per {@link #lookupTimeZonesForNumber(long)}, but receives the number as a PhoneNumber |
||
25 | * instead of a long. |
||
26 | * |
||
27 | * @param $number PhoneNumber the phone number to look up |
||
28 | * @return array the list of corresponding time zones |
||
29 | */ |
||
30 | 7 | public function lookupTimeZonesForNumber(PhoneNumber $number) |
|
38 | |||
39 | /** |
||
40 | * Returns the list of time zones {@code key} corresponds to. |
||
41 | * |
||
42 | * <p>{@code key} could be the calling country code and the full significant number of a |
||
43 | * certain number, or it could be just a phone-number prefix. |
||
44 | * For example, the full number 16502530000 (from the phone-number +1 650 253 0000) is a valid |
||
45 | * input. Also, any of its prefixes, such as 16502, is also valid. |
||
46 | * |
||
47 | * @param $key int the key to look up |
||
48 | * @return array the list of corresponding time zones |
||
49 | */ |
||
50 | 8 | protected function lookupTimeZonesForNumberKey($key) |
|
62 | |||
63 | /** |
||
64 | * Split {@code timezonesString} into all the time zones that are part of it. |
||
65 | * |
||
66 | * @param $timezonesString String |
||
67 | * @return array |
||
68 | */ |
||
69 | 7 | protected function tokenizeRawOutputString($timezonesString) |
|
73 | |||
74 | /** |
||
75 | * Returns the list of time zones {@code number}'s calling country code corresponds to. |
||
76 | * |
||
77 | * @param $number PhoneNumber the phone number to look up |
||
78 | * @return array the list of corresponding time zones |
||
79 | */ |
||
80 | 1 | public function lookupCountryLevelTimeZonesForNumber(PhoneNumber $number) |
|
84 | } |
||
85 |