Example usage:
{@code $shortInfo = ShortNumberInfo::getInstance(); $shortNumber = "110"; $regionCode = "FR"; if ($shortInfo->isValidShortNumberForRegion($shortNumber, $regionCode)) { $cost = $shortInfo->getExpectedCostForRegion($shortNumber, $regionCode); Do something with the cost information here.}}
public getExpectedCostForRegion ( |
||
$number | the short number for which we want to know the expected cost category, as a string | |
$regionDialingFrom | string | the region from which the number is dialed |
return | integer | the expected cost category for that region of the short number. Returns UNKNOWN_COST if the number does not match a cost category. Note that an invalid number may match any cost category. |