Formats a phone number in the specified format using client-defined formatting rules. Note that
if the phone number has a country calling code of zero or an otherwise invalid country calling
code, we cannot work out things like whether there should be a national prefix applied, or how
to format extensions, so we return the national significant number with no formatting applied.
public formatByPattern ( |
||
$number | the phone number to be formatted | |
$numberFormat | integer | the format the phone number should be formatted into |
$userDefinedFormats | array | formatting rules specified by clients |
return | String | the formatted phone number |