本文整理汇总了PHP中XString::getContentWithOutHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::getContentWithOutHtml方法的具体用法?PHP XString::getContentWithOutHtml怎么用?PHP XString::getContentWithOutHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::getContentWithOutHtml方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getFlowPostsInfos
private function _getFlowPostsInfos($posts, $finalId)
{/*{{{*/
$postInfos = array();
foreach($posts as $key => $post)
{
$postInfo = array();
$postInfo['checkupInfo'] = array();
$postInfo['contentHtml'] = '';
$postInfo['contentWithTags'] = '';
$postInfo['title'] = '';
$postInfo['postContent'] = '';
if($post instanceof BookingLog)
{/*{{{*/
$postInfo['postId'] = $post->id;
$postInfo['userId'] = '';
$postInfo['content'] = '预约了您的门诊';
$postInfo['htmlContent'] = $this->getContentWithHTML($postInfo['content']);
$postInfo['contentWithTags'] = '预约了您的门诊';
$postInfo['postTime'] = substr($post->ctime, 0, 16);
$postInfo['adminComment'] = '';
$postInfo['latestId'] = $key;
$postInfo['type'] = 'bookinglog';
$postInfo['attachmentIds'] = '';
$postInfo['attachments'] = array();
$postInfo['presentImgUrl'] = '';
$postInfo['isFinal'] = 0;
if($key == $finalId)
{
$postInfo['isFinal'] = 1;
}
$postInfos[] = $postInfo;
}/*}}}*/
else if($post instanceof DoctorRadioMessage)
{/*{{{*/
$postInfo['postId'] = $post->id;
$postInfo['userId'] = $post->user->id;
list($flowTitle, $flowContent) = $post->getFlowContentAndTitle();
$postInfo['content'] = $flowContent;
$postInfo['htmlContent'] = $this->getRadioMessageContent($post, $flowContent);
$postInfo['contentWithTags'] = $flowContent;
$postInfo['postTime'] = substr($post->ctime, 0, 16);
$postInfo['adminComment'] = '';
$postInfo['latestId'] = $key;
$postInfo['type'] = 'post';
$postInfo['attachmentIds'] = '';
$postInfo['attachments'] = array();
$postInfo['presentImgUrl'] = '';
$postInfo['isFinal'] = 0;
if($key == $finalId)
{
$postInfo['isFinal'] = 1;
}
$postInfos[] = $postInfo;
}/*}}}*/
else if($post instanceof DoctorComment)
{/*{{{*/
$postInfo['postId'] = $post->id;
$postInfo['userId'] = $post->userId;
$postInfo['content'] = '给您写了一封感谢信';
$postInfo['htmlContent'] = $this->getContentWithHTML($postInfo['content']);
$postInfo['contentWithTags'] = '给您写了一封感谢信';
$postInfo['postTime'] = substr($post->ctime, 0, 16);
$postInfo['adminComment'] = '';
$postInfo['latestId'] = $key;
$postInfo['type'] = 'doctorComment';
$postInfo['attachmentIds'] = '';
$postInfo['attachments'] = array();
$postInfo['presentImgUrl'] = '';
$postInfo['isFinal'] = 0;
if($key == $finalId)
{
$postInfo['isFinal'] = 1;
}
$postInfos[] = $postInfo;
}/*}}}*/
else if($post instanceof Post)
{/*{{{*/
$postInfo['postId'] = $post->id;
$postInfo['userId'] = $post->user->id;
$postInfo['content'] = XString::getContentWithOutHtml($post->content);
$postInfo['htmlContent'] = $this->getContentWithHTML($post->content, false, $post->thread->space);
$postInfo['contentWithTags'] = $post->content;
$postInfo['postTime'] = substr($post->ctime, 0, 16);
$postInfo['adminComment'] = '';
$postInfo['latestId'] = $key;
$postInfo['type'] = 'post';
$postInfo['presentImgUrl'] = '';
$postInfo['attachmentIds'] = $post->attachmentIds;
$postInfo['attachments'] = array();
$attachmentIds = explode(",",$post->attachmentIds);
foreach($attachmentIds as $attachmentId)
{
if ($attachmentId)
{
$postInfo['attachments'][] = $this->getAttachmentInfoByAttachId($attachmentId);
}
}
$postInfo['isFinal'] = 0;
if($key == $finalId)
//.........这里部分代码省略.........
示例2: implode
?>
", "<?php
echo implode(',', $attachmentIds);
?>
", "<?php
echo $space->id;
?>
");</script>
<?php
}
if ($flow->isNull() == false && $flow->adminComment) {
?>
<div class="pt5 pb20 pl15 pr15 bg_b1 lh180 gray2 adminComment">
<p class="s_hint">好大夫在线友情提示:</p>
<?php
echo XString::getContentWithOutHtml($flow->adminComment);
?>
</div>
<?php
}
?>
</div>
<div class="hz_advise_bottom"></div>
<p class="pt10 pb5 gray3"><?php
echo $flow->user->privateName;
?>
发表于 <?php
echo $flow->ctime->toString();
if (false == $user->isNull() && $flow->user->id != $user->id) {
include dirname(__FILE__) . '/_complaint.php';
}
示例3: getArticleIntroDetail
private function getArticleIntroDetail($article, $supportHtml="1")
{/*{{{*/
$supportHtml="1";
$supportHtml = ($supportHtml === null) ? '0' : $supportHtml;
$htmlStr = "";
if($supportHtml > 0)
{
$type = 'article';
ob_start();
include(dirname(__FILE__).'/../../templates/doctor/article.php');
$htmlStr = ob_get_contents();
error_log(print_r($htmlStr,true), 3, '/tmp/myerror.log');
ob_end_clean(); }
else
{
$htmlStr = XString::getContentWithOutHtml($article->content);
}
$info['article'] = $htmlStr;
$this->content = $info;
}/*}}}*/
示例4: getPhoneCallContractListByDoctorId
public function getPhoneCallContractListByDoctorId($doctorId)
{/*{{{*/
$doctor = DAL::get()->find('doctor', $doctorId);
if ($doctor->isNull())
{
$this->setErrorCode(119);
return 0;
}
if ($doctor->space->isNull())
{
$this->setErrorCode(300);
return 0;
}
$productList = ProductClient::getInstance()->getProducts($doctor->space, array(serviceDef::TYPE_TELORDER));;
if (empty($productList))
{
$this->setErrorCode(300);
return 0;
}
$infos = array();
foreach($productList as $product)
{
$info['id'] = $product->id;
$info['time'] = $product->duration;
$info['price'] = $product->salePrice;
$info['serviceTitle'] = XString::getContentWithOutHtml($product->name);
$info['name'] = "";
$infos[] = $info;
}
$this->content = $infos;
}/*}}}*/
示例5: getBookingOrder
/**
* getBookingOrder 医生查看订单详情
* @exampleUrl http://dev.mobile-api.haodf.com/doctorapi/bookingorder_getbookingorder?userId=105133781&bookingOrderId=1518927615&xdebug=1
* @param mixed $userId
* @param mixed $bookingOrderId
* @access public
* @return void
*/
public function getBookingOrder($userId, $bookingOrderId)
{/*{{{*/
$goals = array(1=>"检查/诊断", 2=>"治疗/手术", 3=>"检查/诊断 治疗/手术", 4=>"复诊", 5=>"检查/诊断 复诊",
6=>"治疗/手术 复诊", 7=>"检查/诊断 治疗/手术 复诊");
$space = DAL::get()->find('space', $userId);
if($space->isNull())
{
$this->setErrorCode(328);
return 0;
}
$bookingOrder = DAL::get()->find('bookingorder', $bookingOrderId, true);
if ($bookingOrder->isNull())
{
$this->setErrorCode(158);
return 0;
}
if($bookingOrder->space->id != $userId)
{
$this->setErrorCode(159);
return 0;
}
$flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', $bookingOrder->patient->id, $bookingOrder->space->id);
$attachmentIds = BingLiDtoHelper::create($bookingOrder->getBingLiSource())->patientAttachment->makeArray()->patientAttachmentId;
$result = array();
$result['id'] = $bookingOrder->id;
$result['schedule'] = date('Y-m-d H:i',strtotime($bookingOrder->schedule->toString()));
$patient = $bookingOrder->patient;
$result += $this->getBookingOrderPatientMessage($patient);
$result += $this->getBingliDetail($bookingOrder->getBingLiSource()->id, get_class($bookingOrder->getBingLiSource()));
$result['time'] = $bookingOrder->schedule;
$result['address'] = $bookingOrder->getAddressFromBusinessRequireIfNone();
$helper = BingLiDtoHelper::create($bookingOrder->getBingLiSource());
$result['disease'] = $helper->getDiseasesStr();
$result['treatmentStatus'] = $helper->getLastUserCategory();//是否得到过该医生的诊治1是,0否
$result['purpose'] = isset($goals[$helper->getLastGoal()]) ? $goals[$helper->getLastGoal()] : '';//本次预约的目的 1诊察/诊断 2治疗/手术 3复诊
$result['lastTreatmentTitle'] = $helper->getLastUserCategoryDescription();//上次在大夫处就诊时间,最后一次就诊医院 两种情况
$lastTreatmentInfo = str_replace("•", "", $helper->getLastHospitalOrLastTreatedTime());
$result['lastTreatmentInfo'] = $lastTreatmentInfo;
$result['recentTreatment'] = XString::getContentWithOutHtml($helper->getLastConditionDesc()); //病情描述
$result['status'] = $this->getBookingOrderStatus($bookingOrder);
$result['buttonstatus'] = $this->getBookingOrderStatus4Doctor($bookingOrder);
$result['flowtitle'] = '';
$result['flowId'] = '';
if(false == empty($attachmentIds))
{
foreach($attachmentIds as $attachmentId)
{
$result['attachments'][] = MainDataBucket::getAttachmentInfoByAttachId($attachmentId);
}
}
if(false == isset($result['attachments']))
{
$result['attachments'] = array();
}
if(false == $flow->isNull())
{
$result['flowtitle'] = $flow->title;
$result['flowId'] = $flow->id;
$result['userId'] = $flow->space->user->id;
$result['patientId'] = $flow->patient->id;
}
$this->content = $result;
}/*}}}*/
示例6: _getDoctorCommentInfo
private function _getDoctorCommentInfo($comment)
{/*{{{*/
$commentInfo = array();
if(false == $comment->isNull())
{
$commentInfo['id'] = $comment->id;
$commentInfo['patient'] = $comment->displayNameByMask();
$commentInfo['time'] = date('Y-m-d H:i', $comment->ctime->getTime());
$commentInfo['tag'] = $comment->tag;
$commentInfo['effect'] = $comment->skill == '-2' ? '' : $comment->getSkillStr();
$commentInfo['attitude'] = $comment->attitude == '-2' ? '' : $comment->getAttitudeStr();
$commentInfo['doctorName'] = $comment->doctor->name;
$commentInfo['remedyMethod'] = $comment->remedy;
$commentInfo['content'] = XString::getContentWithOutHtml($comment->content);
$commentInfo['adminComment'] = XString::getContentWithOutHtml($comment->adminComment);
$commentInfo['agreeCount'] = (int)($comment->agree);
$commentInfo['postCount'] = (int)($comment->postCount);
if($comment->isCureThankLetter())
{
$commentInfo['type'] = self::TYPE_THANKLETTER;
}
else if($comment->isCureExp())
{
$commentInfo['type'] = self::TYPE_PROCESS;
}
}
return $commentInfo;
}/*}}}*/
示例7: foreach
foreach($telTaskList as $tTask)
{
$i++;
?>
<tr class="<?=($i%2==1)?'gray':''?>">
<td><?=$i?></td>
<td><?=$tTask->ctime->toStringByFormat("m-d H:i:s")?></br>
<span class="gray2" title="分配时间"><?=$tTask->effectiveTime->isZero()?'':$tTask->effectiveTime->toStringByFormat("m-d H:i:s")?>
</span>
</td>
<?php if($isForLeader || $isForMember) { ?>
<td><?=$tTask->nextContactTime->isZero() == false ? $tTask->nextContactTime->toStringByFormat("m-d H:i:s") : "-" ?></td>
<?php }else{ ?>
<td><?=$tTask->utime->isZero() == false ? $tTask->utime->toStringByFormat("m-d H:i:s") : "-" ?></td>
<?php } ?>
<td><a href="<?=$router->urlfor('teltask/showteltask',array('taskid'=>$tTask->id))?>" target="taskright" title="<?=XString::getContentWithOutHtml($tTask->executerDesc)?>"><?=$tTask->id?></a></td>
<td><?=$tTask->getTaskTypeTitle()?><br/><span class="green"><?=$tTask->getProfessionalGroupTitle()?></span></td>
<?php if($isForAllListItem == false) { ?>
<td><a href="<?=$router->urlfor('teltask/teltasklist',array_merge($defaultArray,array('telNo'=>$tTask->telNo,'exeUserName'=>$tTask->executerUser->name)))?>"><?=$tTask->telNo?></a>
<span style="color:red;">(<?=$tTask->queryCntByTelNoAndSaler($tTask->executerUser->id)?>)</span>
</td>
<td><a href="<?=$router->urlfor('teltask/teltasklist',array_merge($defaultArray,array('userName'=>$tTask->getTelOrder()->patient->user->name,'exeUserName'=>$tTask->executerUser->name)))?>"><?=$tTask->getTelOrder()->patient->user->name?></a></td>
<?php }else{ ?>
<td><a href="<?=$router->urlfor('teltask/teltasklist',array_merge($defaultArray,array('telNo'=>$tTask->telNo)))?>"><?=$tTask->telNo?></a></td>
<td><a href="<?=$router->urlfor('teltask/teltasklist',array_merge($defaultArray,array('userName'=>$tTask->getTelOrder()->patient->user->name)))?>"><?=$tTask->getTelOrder()->patient->user->name?></a></td>
<?php } ?>
<?php if($isForAllListItem) { ?>
<td>
<?php if($tTask->executerUser->isNullSpace() == false) { ?>
<a href="<?=$router->urlfor('teltask/teltasklist',array_merge($defaultArray,array('exeUserName'=>$tTask->executerUser->name)))?>"><?=$tTask->executerUser->name?></a>
<?php } ?>
示例8: getBookingOrderByDoctorId
public function getBookingOrderByDoctorId($doctorId, $bookingOrderId)
{/*{{{*/
$paperstypes = array(0 => "身份证", 1=>"护照", 2=>"军人证", 3=>"台胞证", 4=>"港澳居民内地通行证");
$sexs = array(0=>"女", 1=>"男");
$goals = array(1=>"检查/诊断", 2=>"治疗/手术", 3=>"检查/诊断 治疗/手术", 4=>"复诊", 5=>"检查/诊断 复诊", 6=>"治疗/手术 复诊", 7=>"检查/诊断 治疗/手术 复诊");
$doctor = DAL::get()->find('doctor', $doctorId);
$res = $this->checkDoctorAndSpace($doctor);
if($res)
{
$this->setErrorCode($res);
return 0;
}
$bookingOrder = DAL::get()->find('bookingorder', $bookingOrderId);
if ($bookingOrder->isNull())
{
$this->setErrorCode(158);
return 0;
}
if($bookingOrder->space->host->id != $doctorId)
{
$this->setErrorCode(159);
return 0;
}
$result = array();
$result['id'] = $bookingOrder->id;
$result['schedule'] = strtotime($bookingOrder->schedule);
$result['address'] = $bookingOrder->address;
$patient = $bookingOrder->patient;
$result['patientName'] = $patient->name;
$result['age'] = $patient->age == '' ? 0 : $patient->age;
$result['birthday'] = XDateTime::isDate($patient->birthday) == false ? 0 : $patient->birthday;
$result['sex'] = $sexs[$patient->sex];
$result['idType'] = $paperstypes[$patient->paperstype];
$result['idNumber'] = $patient->idcard;
$result['province'] = $patient->province.$patient->city;
if($patient->province == $patient->city)
{
$result['province'] = $patient->province;
}
$helper = BingLiDtoHelper::create($bookingOrder->getBingLiSource());
$result['disease'] = $helper->getDiseasesStr();
$result['treatmentStatus'] = $helper->getLastUserCategory();//是否得到过该医生的诊治1是,0否
$result['purpose'] = $goals[$helper->getLastGoal()];//本次预约的目的 1诊察/诊断 2治疗/手术 3复诊
$result['lastTreatmentTitle'] = $helper->getLastUserCategoryDescription();//上次在大夫处就诊时间,最后一次就诊医院 两种情况
$result['lastTreatmentInfo'] = $helper->getLastHospitalOrLastTreatedTime();
$result['recentTreatment'] = XString::getContentWithOutHtml($helper->getLastConditionDesc());
$result['status'] = $this->getBookingOrderStatus4Doctor($bookingOrder);
$result['canConfirm'] = 0;
if (BookingOrder::STATUS_AUDIT == $bookingOrder->status && !$bookingOrder->isOverdue())
{
$result['canConfirm'] = 1;
}
$result['canDeny'] = 0;
if (BookingOrder::STATUS_AUDIT == $bookingOrder->status)
{
$result['canDeny'] = 1;
}
$result['canFinish'] = 0;
if (BookingOrder::STATUS_FINISHED == $bookingOrder->status)
{
$result['canFinish'] = 1;
}
$this->content = $result;
}/*}}}*/
示例9: getProductList
/**
* getProductList 取电话咨询产品列表
*
* @param mixed $userId
* @access public
* @return void
*/
public function getProductList($userId)
{/*{{{*/
$space = DAL::get()->find('space', $userId);
$telOwner = DAL::get()->find_by_relatedObject('telowner', $space->user);
$productApplyList = $productList = $res = $sortList = array();
if($telOwner->isNull() == false)
{
$productApplyList =DAL::get()->find_all_by_spaceid_and_status_and_servicedef('ProductApply', $space->id, ProductApply::STATUS_INIT, ServiceDef::TYPE_TELORDER);
$contract = DAL::get()->find_by_spaceid_and_type_and_status('contract', $space->id, ServiceDef::TYPE_TELORDER, Contract::STATUS_VALID);
if ($contract instanceof Contract)
{
$productList = DAL::get()->find_all_by_contractid_and_status("Product", $contract->id, Product::STATUS_VALID);
}
}
foreach($productApplyList as $productApply)
{
$out['utime'] = strtotime($productApply->utime);
$out['id'] = $productApply->id;
$out['name'] = '';
$out['price'] = intval($productApply->price);
$out['time'] = $productApply->duration;
$out['status'] = 0;
$out['remark'] = XString::getContentWithOutHtml($productApply->spaceRemark);
$res[] = $out;
$sortList[] = $out['utime'];
}
$out = array();
foreach($productList as $product)
{
$out['utime'] = strtotime($product->utime);
$out['id'] = $product->id;
$out['name'] = XString::getContentWithOutHtml($product->name);
$out['price'] = intval($product->salePrice);
$out['time'] = $product->duration;
$out['status'] = 1;
$out['remark'] = XString::getContentWithOutHtml($product->remark);
$res[] = $out;
$sortList[] = $out['utime'];
}
array_multisort($sortList, SORT_DESC, $res);
$res = $this->sortProductList($res);
$this->content = $res;
return $res;
}/*}}}*/
示例10: _getFlowPostInfos
private function _getFlowPostInfos($post, $key, $finalId)
{/*{{{*/
$space = ($post instanceof Post)?$post->thread->space:$post->doctorPatientRef->space;
$postInfo['postId'] = $post->id;
$postInfo['title'] = '';
$postInfo['userId'] = $post->user->id;
$pattern = array ( "/<!--[^!]*-->/i", "/ /", "/ /", "/ /", "/</", "/>/", "/</", "/>/");
$replace = array ( "", " ", " ", " ", '#lt;', '#gt;', '#lt;', '#gt;');
$content = preg_replace($pattern, $replace, $post->content);
$request = new Request();
$postInfo['content'] = $this->_getDoctorpatientpost(XString::getContentWithOutHtml($content));
$postInfo['postTime'] = substr($post->ctime, 0, 16);
$postInfo['contentTime'] = $post->getSoundPostTime();
$postInfo['adminComment'] = $this->_getAdminComment(XString::getContentWithOutHtml($post->adminComment));
$postInfo['latestId'] = $key;
$postInfo['type'] = 'post';
if($post->isHavePicture() && $post->isSpaceReply())
{
list($postAttachmentIds, $postPictureInfo) = $this->getPicturePost($post);
$postInfo['attachmentIds'] = $postAttachmentIds;
$postInfo += $postPictureInfo;
}
else
{
$postInfo['attachmentIds'] = implode(array_filter($post->attachmentIds), ",");
foreach ($post->attachmentIds as $attachmentId)
{
if($attachmentId)
{
$postInfo['attachments'][] = MainDataBucket::getAttachmentInfoByAttachId($attachmentId);
}
}
}
if(false == isset($postInfo['attachments']))
{
$postInfo['attachments'] = array();
}
$postInfo['presentImgUrl'] = '';
$postInfo['isFinal'] = 0;
$postInfo['detailContent'] = '';
if($key == $finalId)
{
$postInfo['isFinal'] = 1;
}
return $postInfo;
}/*}}}*/
示例11: include_once
</div>
<div class="h_mz_checkdoctor2"><span>加号状态:</span><?php include_once('proposal/_bookingstatus.php')?></div>
<div class="h_mz_checkdoctor2"><span>加号时间:</span><?=$bookingDto->getRealBookingTime()?></div>
<? } ?>
<?php if($proposal->isFromThread() && $proposal->threadStatusDesc() != ''){ ?>
<div class="h_mz_checkdoctor2"><span>服务状态:<?=$proposal->threadStatusDesc()?></span><?php ?></div>
<? } ?>
<?php if($proposal->hasSpace()){ ?>
<div class="h_mz_checkdoctor2"><span>请求医生:</span><?=$proposal->space->realName?>(<?=$proposal->space->host->getHospitalName()?>/<?=$proposal->space->host->getHospitalFacultyName()?>)</div>
<? } ?>
<?php if($proposal->getAdminComment() != "") {?>
<div class="h_mz_checkdoctor2"><span>管理员提示:</span><?=XString::getContentWithOutHtml($proposal->getAdminComment())?></div>
<?php } ?>
<ul class="h_mz_xq_bot">
<!--患者信息 start-->
<?php include('binglidetail/_patient.php');?>
<!--患者信息 end-->
<!--病例内容 start-->
<?php include('binglidetail/_allbingli.php');?>
<!--病例内容 start-->
</ul>
</div>
<!--附件信息 start-->
示例12: getCommonArticleInfos
private function getCommonArticleInfos($articleList)
{/*{{{*/
$infos = array();
foreach($articleList as $article)
{
if (trim(strip_tags($article->content)) == '')
{
continue;
}
$info = array();
$info['articleId'] = $article->id;
$info['doctorId'] = '';
$info['logoUrl'] = '';
if(!empty($article->space) && $article->space->host instanceof Doctor)
{
$info['doctorId'] = $article->space->host->id;
$doctor = $article->space->host;
$info['logoUrl'] = $doctor->getHeadImageForMobile();
}
$info['title'] = $article->title;
$info['ctime'] = XDateTime::printTime4Touch($article->ctime->getTime(), 'Y-m-d');
$info['readCount'] = $this->getHits($article);
$info['intro'] = trim(mb_substr(XString::getContentWithOutHtml($article->content), 0, 90, 'gbk'));
$infos[] = $info;
}
return $infos;
}/*}}}*/