示例#1
0
 public function isCellPhoneLengthEnough($cellphone)
 {
     return Import::MINLENGTH_TEL < strlen(keepOnlyNumber(nfTowf($cellphone, 0)));
 }
示例#2
0
 public function genProperFormatCellphone($val)
 {
     $cellPhone = keepOnlyNumber(nfTowf($val));
     if (Import::CELLPHONE_ALTERHEAD === substr($cellPhone, 0, strlen(Import::CELLPHONE_ALTERHEAD))) {
         $cellPhone = str_replace_first(Import::CELLPHONE_ALTERHEAD, Import::CELLPHONE_HEADCHAR, $cellPhone);
     }
     if (Import::MINLENGTH_CELLPHONE === strlen($cellPhone)) {
         $cellPhone = Import::CELLPHONE_HEADCHAR . $cellPhone;
     }
     return $cellPhone;
 }