| 1 |
<?php |
| 2 |
|
| 3 |
namespace libphonenumber; |
| 4 |
|
| 5 |
/** |
| 6 |
* Possible outcomes when testing if a PhoneNumber is possible. |
| 7 |
*/ |
| 8 |
class ValidationResult |
| 9 |
{ |
| 10 |
/** |
| 11 |
* The number length matches that of valid numbers for this region |
| 12 |
*/ |
| 13 |
const IS_POSSIBLE = 0; |
| 14 |
|
| 15 |
/** |
| 16 |
* The number has an invalid country calling code. |
| 17 |
*/ |
| 18 |
const INVALID_COUNTRY_CODE = 1; |
| 19 |
|
| 20 |
/** |
| 21 |
* The number is shorter than all valid numbers for this region. |
| 22 |
*/ |
| 23 |
const TOO_SHORT = 2; |
| 24 |
|
| 25 |
/** |
| 26 |
* The number is longer than all valid numbers for this region. |
| 27 |
*/ |
| 28 |
const TOO_LONG = 3; |
| 29 |
|
| 30 |
/** |
| 31 |
* The number length matches that of local numbers for this region only (i.e. numbers that may |
| 32 |
* be able to be dialled within an area, but do not have all the information to be dialled from |
| 33 |
* anywhere inside or outside the country). |
| 34 |
*/ |
| 35 |
const IS_POSSIBLE_LOCAL_ONLY = 4; |
| 36 |
|
| 37 |
/** |
| 38 |
* The number is longer than the shortest valid numbers for this region, shorter than the |
| 39 |
* longest valid numbers for this region, and does not itself have a number length that matches |
| 40 |
* valid numbers for this region. This can also be returned in the case where |
| 41 |
* isPossibleNumberForTypeWithReason was called, and there are no numbers of this type at all |
| 42 |
* for this region. |
| 43 |
*/ |
| 44 |
const INVALID_LENGTH = 5; |
| 45 |
} |
| 46 |
|