本文整理汇总了PHP中XString::convertUTF8ToGBK方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::convertUTF8ToGBK方法的具体用法?PHP XString::convertUTF8ToGBK怎么用?PHP XString::convertUTF8ToGBK使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::convertUTF8ToGBK方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doAddBingliToIntention
public function doAddBingliToIntention($request, $response)
{/*{{{*/
$intention = DAL::get()->find('Intention', $request->intentionId);
DBC::requireTrue(false == $intention->isNull() && $this->user->id == $intention->user->id, '无效数据');
$content = trim(XString::convertUTF8ToGBK($request->content));
$paIds = array_filter(explode(',', $request->attachmentIds));
$newIntention = IntentionClient::getInstance()->replenishFromIntention($intention, Intention::SRC_TOUCH, $content, $paIds);
$response->setRedirect($response->router->urlfor('intention/intentionlist', array('patientId' => $newIntention->patient->id)));
}/*}}}*/
示例2: collectMedicineInfo
private function collectMedicineInfo($request, $response)
{/*{{{*/
if(XString::getLengthOfGBKString($_REQUEST['medname'])<1 || XString::getLengthOfGBKString($_REQUEST['medname'])>35)
{
throw new BizException('用药名称为必填信息且不能超过35字');
}
if(XString::getLengthOfGBKString($_REQUEST['meddesc'])<1 || XString::getLengthOfGBKString($_REQUEST['meddesc'])>100)
{
throw new BizException('服用说明必填信息且不能超过100字');
}
$medicineName = XString::convertUTF8ToGBK(ltrim($request->medicineName));
$medicineDesc = XString::convertUTF8ToGBK(ltrim($request->medicineDesc));
$medicine = BingLiDto::createMedicineDto($medicineName, $medicineDesc);
return $medicine;
}/*}}}*/
示例3: addOtherInfo4Patient
public function addOtherInfo4Patient($request, $response)
{
$user = $this->user;
$params = array();
$birthday = "{$request->dateyear}-{$request->datemonth}-{$request->dateday}";
$params['birthday'] = $birthday;
$params['sex'] = $request->sex;
$params['province'] = XString::convertUTF8ToGBK($request->province);
$params['city'] = XString::convertUTF8ToGBK($request->city);
$params['relation'] = $request->relation;
$medicalCardNo = $request->medicalCardNo;
$caseNo = $request->caseNo;
$signinId = $request->signinId;
$patientSignin = DAL::get()->find('patientsignin', $signinId);
$patientId = $request->patientId;
PatientClient::getInstance()->modifyInfo($patientId, $params);
PatientSigninClient::getInstance()->updateMedicalCardNoOrHospitalCaseNO($patientSignin, $user, $medicalCardNo, $caseNo);
$response->setRedirect($response->router->urlfor('user/talkstodoctor', array('signinId'=>$signinId, 'spaceId'=>$request->spaceId, 'patientId'=>$patientId)));
}
示例4: ajaxCheckSensComment
public function ajaxCheckSensComment($request, $response)
{/*{{{*/
$content = XString::convertUTF8ToGBK($request->content);
$sensContentArr = BeanFinder::get('ContentFilter')->getSensitiveWordsRecursive('comment', $content);
foreach ($sensContentArr as $key => $sensContent)
{
if (preg_match('/(?:\d[\-]?){11}/', $sensContent))
{
unset($sensContentArr[$key]);
}
}
$isSens = count($sensContentArr) > 0 ? '1' : '0';
$res = array('issens' => $isSens);
echo json_encode($res);
return parent::DIRECT_OUTPUT;
}/*}}}*/
示例5: saveConditionDesc
public function saveConditionDesc($request, $response)
{/*{{{*/
$_SESSION['telOrderInfo']['desc'] = XString::convertUTF8ToGBK($request->desc);
return self::DIRECT_OUTPUT;
}/*}}}*/