request->getPost(); $verifyValidator = new VerifyValidator(); $captchaValidator = new CaptchaValidator(); $captchaValidator->checkCode($post['ticket'], $post['rand']); $isMail = CommonValidator::email($post['account']); if ($isMail) { $account = $verifyValidator->checkEmail($post['account']); $service = new MailVerifyService(); } else { $account = $verifyValidator->checkPhone($post['account']); $service = new SmsVerifyService(); } $service->handle($account); } }