| 1 |
<?php |
| 2 |
|
| 3 |
namespace libphonenumber; |
| 4 |
|
| 5 |
/** |
| 6 |
* Country code source from number |
| 7 |
*/ |
| 8 |
class CountryCodeSource |
| 9 |
{ |
| 10 |
/** |
| 11 |
* The country_code is derived based on a phone number with a leading "+", e.g. the French |
| 12 |
* number "+33 1 42 68 53 00". |
| 13 |
*/ |
| 14 |
const FROM_NUMBER_WITH_PLUS_SIGN = 0; |
| 15 |
/** |
| 16 |
* The country_code is derived based on a phone number with a leading IDD, e.g. the French |
| 17 |
* number "011 33 1 42 68 53 00", as it is dialled from US. |
| 18 |
*/ |
| 19 |
const FROM_NUMBER_WITH_IDD = 1; |
| 20 |
/** |
| 21 |
* The country_code is derived based on a phone number without a leading "+", e.g. the French |
| 22 |
* number "33 1 42 68 53 00" when defaultCountry is supplied as France. |
| 23 |
*/ |
| 24 |
const FROM_NUMBER_WITHOUT_PLUS_SIGN = 2; |
| 25 |
/** |
| 26 |
* The country_code is derived NOT based on the phone number itself, but from the defaultCountry |
| 27 |
* parameter provided in the parsing function by the clients. This happens mostly for numbers |
| 28 |
* written in the national format (without country code). For example, this would be set when |
| 29 |
* parsing the French number "01 42 68 53 00", when defaultCountry is supplied as France. |
| 30 |
*/ |
| 31 |
const FROM_DEFAULT_COUNTRY = 3; |
| 32 |
|
| 33 |
const UNSPECIFIED = 4; |
| 34 |
} |
| 35 |
|