69 $phone = (string)$phone;
70 $value = preg_replace(
"/[^0-9\#\*]/i",
"", $phone);
74 $altPhone = str_replace(
' ',
'', $phone);
75 $this->tokens[$altPhone] =
true;
77 $convertedPhone = PhoneNumber\Parser::getInstance()
80 if ($convertedPhone != $altPhone)
82 $this->tokens[$convertedPhone] =
true;
85 $length = mb_strlen($value);
86 if($length >= 10 && mb_substr($value, 0, 1) ===
'7')
88 $altPhone =
'8'.mb_substr($value, 1);
89 $this->tokens[$altPhone] =
true;
96 for($i = 0; $i < $bound; $i++)
98 $key = mb_substr($value, $i);
99 $this->tokens[$key] =
true;