Parses a string and returns it in proto buffer format. This method differs from {@link #parse}
in that it always populates the raw_input field of the protocol buffer with numberToParse as
well as the country_code_source field.
public parseAndKeepRawInput ( string $numberToParse, string $defaultRegion, |
||
$numberToParse | string | number that we are attempting to parse. This can contain formatting such as +, ( and -, as well as a phone number extension. It can also be provided in RFC3966 format. |
$defaultRegion | string | region that we are expecting the number to be from. This is only used if the number being parsed is not written in international format. The country calling code for the number in this case would be stored as that of the default region supplied. |
$phoneNumber | ||
return | a phone number proto buffer filled with the parsed number |