本文整理汇总了PHP中XString::convertArrayToGbk方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::convertArrayToGbk方法的具体用法?PHP XString::convertArrayToGbk怎么用?PHP XString::convertArrayToGbk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::convertArrayToGbk方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajaxSendMessageNfs
public function ajaxSendMessageNfs($request, $response)
{
/*{{{*/
$msgInfos = $_POST['msginfo'];
$msgInfos = XString::convertArrayToGbk($msgInfos);
$phoneNums = $msgInfos['phonenum'];
$patientNames = $msgInfos['patientname'];
$doctorNames = $msgInfos['doctorname'];
$contents = $msgInfos['content'];
$data = array();
foreach ($phoneNums as $key => $value) {
$phoneNum = $value;
$patientName = $patientNames[$key];
$doctorName = $doctorNames[$key];
$content = $contents[$key];
$preg1 = '/{?\\$data\\[(\'|\\"){1}(patientname){1}(\'|\\"){1}\\]}?/';
$preg2 = '/{?\\$data\\[(\'|\\"){1}|(doctorname){1}(\'|\\"){1}\\]}?/';
$content = preg_replace($preg1, $patientName, $content);
$content = preg_replace($preg2, $doctorName, $content);
SMSClient::getInstance()->sendSMS(array($phoneNum), $content, SMSLog::OPT_TYPE_FULLOWUP, '', SMSMD::EXT_8);
}
//有时会先执行下面writeMessageSendLog中的sql,再执行上面sendSMS的sql,这样会有逻辑错误。暂时sleep一下处理
sleep(1);
FollowupClient::getInstance()->writeMessageSendLog($phoneNums, $request->contenttype, $request->msgtemplateid, $this->auditor);
echo "success";
return parent::DIRECT_OUTPUT;
}
示例2: ajaxSetUpdateSession
private function ajaxSetUpdateSession($request, $response)
{/*{{{*/
if (!session_id())
{
session_start();
}
$intentionInfos = $request->intentionInfos;
$params = array();
foreach ($intentionInfos as $key => $intentionInfo)
{
foreach ($intentionInfo as $type => $value)
{
DBC::requireFalse($type == 'diseaseInfos' && $value['diseaseName'] == "", "疾病信息不能为空");
$_SESSION['askUpdateMemory'][$request->intentionid][$type][$key] = XString::convertArrayToGbk($value);
}
}
}/*}}}*/
示例3: createPatientCourse
private function createPatientCourse($patientCase, $request)
{
/*{{{*/
$courseType = XString::convertToGbk($request->courseType);
$courseMark = XString::convertToGbk($request->courseMark);
$courseDetails = XString::convertArrayToGbk($request->courseDetails);
$courseSummary = md5($patientCase->doctorOwner->id . XString::convertToGbk($request->name) . time());
$patientCourseAsyncDto = PatientCourseAsyncDto::create($patientCase, $courseType, $courseSummary, $request->courseOccurDate, $courseMark, $courseDetails, 'INSPECTOR');
$patientCourseInfos = PatientCourseClient::getInstance()->createPatientCourseWithContent($patientCourseAsyncDto);
$patientCourse = new NullEntity();
if (isset($patientCourseInfos['courseId']) && $patientCourseInfos['courseId']) {
$patientCourse = DAL::get()->find('patientcourse', $patientCourseInfos['courseId']);
PatientCourseClient::getInstance()->setPatientCoursePass($this->curInspector, $patientCourse);
}
return $patientCourse;
}