本文整理汇总了PHP中BeanFinder类的典型用法代码示例。如果您正苦于以下问题:PHP BeanFinder类的具体用法?PHP BeanFinder怎么用?PHP BeanFinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BeanFinder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRealData
private function getRealData(Hospital $hospital)
{/*{{{*/
$hospitalList = array();
$isPlus = PlussignChannelClient::getInstance()->isHospitalBookDoctor($hospital->commonName);
$res['url'] = $hospital->getUrl();
$res['name'] = $hospital->commonName;
$res['address'] = ($hospital->address)?$hospital->address:"暂无";
$res['phone'] = ($hospital->address)?$hospital->phone:"暂无";
$res['pageSize'] = rand(60, 66).'K';
$res['date'] = date('Y-m-d', time());
$res['mapUrl'] = $hospital->getReMapUrl();
$res['scheduleUrl'] = $hospital->getScheduleUrl();
if($isPlus)
{
$res['extTitle'] = "预约加号";
$res['extUrl'] = 'http://jiahao.haodf.com/jiahao/search.htm?district='.urlencode($hospital->city).'&hospitalName='.urlencode($hospital->commonName);
}
else
{
$res['extTitle'] = "大夫文章";
$res['extUrl'] = $hospital->getArticleUrl();
}
$res['doctorUrl'] = $hospital->getDoctorUrl();
$res['infoUrl'] = $hospital->getInfoUrl();
$hospitalList['item'] = $res + $this->getAlias($hospital);
BeanFinder::get('LocalCache')->removeAll();
return $hospitalList;
}/*}}}*/
示例2: getData
protected function getData($nowPage, $pageSize)
{/*{{{*/
$hospitalList = DAL::get()->find_all_AllHospital4Sc('hospital', $nowPage, $pageSize);
$doctorDescription = array();
foreach($hospitalList as $hospital)
{
$doctorList = DAL::get()->find_all_by_hospitalid('doctor', $hospital->id);
foreach($doctorList as $doctor)
{
$tempIntroArray = array();
$tempIntroArray['key'] = $hospital->commonName.$doctor->name;
$tempIntroArray['city'] = $hospital->city;
$tempIntroArray['doctor_name'] = $doctor->name;
$tempIntroArray['doctor_pic'] = '';
$tempIntroArray['doctor_link'] = $doctor->getTouchUrl();
$tempIntroArray['hospital'] = $hospital->name;
$tempIntroArray['department'] = $doctor->getHospitalFacultyName();
$tempIntroArray['doctor_title'] = $doctor->grade." ".$doctor->educateGrade;
$tempIntroArray['good_at'] = trim(XString::truncate($doctor->specialize, 200));
$doctorIntro = trim(XString::truncate(strip_tags($doctor->intro), 200));
$tempIntroArray['personal_details'] = $doctorIntro;
$tempIntroArray['personal_details_link'] = $doctor->getTouchIntroUrl();
$tempIntroArray['site_name'] = '好大夫在线';
$doctorDescription[] = array('item' => $tempIntroArray);
unset($doctor);
}
unset($doctorList);
unset($hospital);
BeanFinder::get('LocalCache')->removeAll();
}
unset($hospitalList);
BeanFinder::get('LocalCache')->removeAll();
return $doctorDescription;
}/*}}}*/
示例3: getData
protected function getData($nowPage, $pageSize)
{/*{{{*/
$options['filterKeys'] = array('huoluan','ruchongbing','zhiwushenjingjibing','mafeng','poshangfeng','yaozheshang','dongwuxingpifubing','wulixingpifubing',
'baisekangzhen','tijian','nueji','shuyi','feidian','tianhua','bairike','xinghongre','jiyan','duoqiguangongnengbuquan','jiaoganshenjingyingyangbuliang',
'baihou','biyingjiebing','bibunaomonaopengchu','chuanranxingdanhexibaozengduozheng','dongmailiuxinggunangzhong','dianji','ganjiqiuyoubing','hegugusuiyan',
'houguanjieyan','yingyoueryindaoyan','jisuixueguanjibing','jingbuchuangshang','jingdongmaitiliu','yasuigaihua','yihejianxiganran','pifujiehebing',
'qinliugan','sheyanshenjingtong','shenyouzheng','sihuansuya','xiaoerreyezonghezheng','xiaoerhoujingluan','xiaoerkouyan','xinshengerchanshangxingjibing',
'xinzangsunshang','yanni','yanjianyanzheng','yizhiquefazheng','zhongshu','chixuxingzhiwuzhuangtai','wangyin','xiongmojianpiliu','xiongkuochukouzonghezheng',
'jingnangyan','dixueya','zhichangxinliwenti','shixuexibaozonghezheng','tengtong');
$diseaseList = DiseaseClient::getInstance()->getAllDiseaseList($nowPage, $pageSize, $options);
$diseases = array();
foreach ($diseaseList['list'] as $disease)
{
$diseaseNames = $this->getAllNames($disease);
if (count($diseaseNames)>1)
{
foreach ($diseaseNames as $key => $diseaseName)
{
$diseases[] = $this->getRealData($disease, $diseaseName);
unset($diseaseName);
}
}
else
{
$diseases[] = $this->getRealData($disease);
}
}
BeanFinder::get('LocalCache')->removeAll();
return $diseases;
}/*}}}*/
示例4: getRealData
private function getRealData(Hospital $hospital, $hospitalName = '')
{/*{{{*/
$res = array();
if ($hospitalName)
{
$hsName = $hospitalName;
}
else
{
$hsName = $hospital->name;
}
$hospitals['item']['key'] = $hsName;
$hospitals['item']['title'] = XString::truncate($hospital->commonName.'科室列表_门诊时间表_专家推荐_好大夫在线',59,'');
$hospitals['item']['level'] = $hospital->getGradeStr();//
$hospitals['item']['url'] = $hospital->getUrl();
$hospitals['item']['address'] = strip_tags($hospital->address);
$hospitals['item']['address_url'] = $hospital->getReMapUrl();
$hospitals['item']['description'] = strip_tags($hospital->intro);
$hospitals['item']['description_url'] = $hospital->getInfoUrl();
$hospitals['item']['luxian'] = $hospital->addressinfo;
$hospitals['item']['telephone'] = $hospital->phone;
$hospitals['item']['online_doctors'] = $hospital->spaceCount;
$hospitals['item']['online_doctors_url'] = $hospital->getDoctorUrl();
$hospitals['item']['tel_doctors'] = HospitalClient::getInstance()->getHospitalDirectCallCount($hospital->id);
$hospitals['item']['tel_doctors_url'] = $hospital->getTelDoctorUrl();
$hospitals['item']['showurl'] = 'www.haodf.com/';
$res[] = $hospitals;
BeanFinder::get('LocalCache')->removeAll();
return $res;
}/*}}}*/
示例5: getRealData
private function getRealData(Hospital $hospital, $hospitalName = '')
{/*{{{*/
$res = array();
$hospitalList = array();
if ($hospitalName)
{
$hsName = $hospitalName;
}
else
{
$hsName = $hospital->name;
}
$res['key'] = $hsName;
$res['url'] = $hospital->getUrl();
$res['title'] = XString::truncate($hsName.'科室列表,门诊时间,专家推荐_好大夫在线', 59, '...');
$res['showUrl'] = 'www.haodf.com';
$res['pageSize'] = rand(60, 66).'K';
$res['date'] = date('Y-m-d', time());
$extContent = ($hospital->spaceCount > 0) ? ",以及".$hospital->spaceCount."位医生提供免费网上咨询":"";
$res['content'] = "提供医院简介、地址、预约挂号电话、科室门诊时间,包括".$hsName.$hospital->facultyCount."个科室、".$hospital->doctorCount."位医生的相关介绍".$extContent;
$hospitalList['item'] = $res;
BeanFinder::get('LocalCache')->removeAll();
return $hospitalList;
}/*}}}*/
示例6: __construct
public function __construct()
{/*{{{*/
DAL::get()->setUp('space');
$this->dbexecuter = BeanFinder::get('dbexecuter');
$this->dbexecuter->mustUseMaster();
//流量波动在30%以上视为异常
$this->threshold = 0.3;
//在每天的这个时刻检查
$this->checks = array('08:00', '00:20');
//检查医生的最后在线时间起始时间,即从这个时间内的数量监控
$this->fromCheckTime = time()-24*3600;
//检查医生在规定时间(fromCheckTime)的最小更新数
$this->checkActivityTimeCount = 1000;
//检查以下医生的流量
$this->doctors = array();
$this->doctors[] = array('id'=> 157236, 'name'=>'潘嘉严');
$this->doctors[] = array('id'=> 95228, 'name'=>'肖晖');
$this->doctors[] = array('id'=> 476336, 'name'=>'陈秋');
$this->doctors[] = array('id'=> 66224, 'name'=>'吴鸣');
}/*}}}*/
示例7: terminate
public function terminate()
{/*{{{*/
BeanFinder::destroy('configs');
BeanFinder::destroy('dbexecuter');
BeanFinder::destroy('idgenter');
BeanFinder::destroy('debug');
}/*}}}*/
示例8: addRemitFromPhone
public function addRemitFromPhone($request, $response)
{/*{{{*/
$bankPhoneNo = $request->bankPhoneNo;
$phoneNo = $request->phoneNo;
//if($phoneNo != 13439853264 || $phoneNo != 13501126300)
//{
// echo "错误的手机号";
// exit;
//}
$remitTime = $request->remitTime/1000;
$remitTime = xdatetime::valueOfTime($remitTime);
$message = mb_convert_encoding($request->message, "gbk", "utf-8");
//$message = $request->message;
$device = $request->device;
$logger = new Logger('sms_remit', BeanFinder::get('configs')->remitLogPath, Logger::getLevelName(Logger::INFO));
$logger->addInfo('device:'.$device.' bankPhoneNo:'.$bankPhoneNo.' phoneNo:'.$phoneNo.' message:'.$message);
$recorder = DAL::get()->find_by_name('user', 'jm130');
$res = AccountClient::getInstance()->createRemitAuto($recorder, $bankPhoneNo, $phoneNo, $remitTime, $message);
if ($res['errorcode'] != 0 && false == empty($message))
{
$msg = $device." errorcode:".$res['errorcode']." message:".$message;
//给whd & yyp & wk
SMSClient::getInstance()->sendSMS(array(18612032258, 13691343423, 13720084864), $msg);
}
$res = json_encode($res);
echo $res;
return parent::DIRECT_OUTPUT;
}/*}}}*/
示例9: getRealData
private function getRealData($nowPage, $pageSize, $province)
{/*{{{*/
$options['hospitalGrade'] = Hospital::GRADE_6;
$options['orderByDesc'] = 'fld_HospitalCommentCount';
$options['province'] = $province;
$hospitalList = HospitalClient::getInstance()->getHospitalByOption($nowPage, $pageSize, $options);
$area = 'province'; //对省和市进行标记
$realData[] = $this->buildData($nowPage, $pageSize, $hospitalList, $area);
$cities = City::getProvinceCities($province);
if(in_array(array_shift($cities), $this->directlyCities))
{
return $realData;
}
foreach($cities as $city)
{
$area = 'city';
$options['city'] = $city;
$hospitalList4City = HospitalClient::getInstance()->getHospitalByOption($nowPage, $pageSize, $options);
$realData[] = $this->buildData($nowPage, $pageSize, $hospitalList4City, $area);
unset($city);
}
BeanFinder::get('LocalCache')->removeAll();
return $realData;
}/*}}}*/
示例10: __construct
public function __construct($request, $response)
{/*{{{*/
parent::__construct($request, $response);
UserClient::getInstance()->checkGuest();
$response->user = $this->user = $this->getCookieUser();
$response->askSpace = $this->askSpace = AskSessionInfo::getBindSpace();
$response->touchAppName = BeanFinder::get('configs')->touchAppName;
$response->touchUrl = BeanFinder::get('configs')->touchUrl;
$response->touchUrlHome = BeanFinder::get('configs')->touchUrl.'/index.htm';
$response->touchDomain = BeanFinder::get('configs')->touchDomain;
$this->touchDomain = BeanFinder::get('configs')->touchDomain;
$response->imgTimestamp = BeanFinder::get('configs')->imgTimestamp;
$response->mobileUrl = "http://".URL_PREFIX."m.haodf.com/p";
$response->wwwUrl = "http://www.".URL_PREFIX."haodf.com/";
$response->suggestionUrl = BeanFinder::get('configs')->touchUrl."/suggestion/suggestion";
$response->fromOtherHost =$request->isQueryFromOtherHost();
$response->backCnt = 1;
$response->hostUri = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if(isset($_SERVER['HTTP_REFERER']))
{
$response->backCnt = (strstr($_SERVER['HTTP_REFERER'], self::SELECT_PAGE_PARAM))?2:1;
}
$response->_action = $request->action;
$response->mCanUpload = $this->canUpload();
}/*}}}*/
示例11: __construct
public function __construct()
{/*{{{*/
DAL::get()->setUp('message');
$this->dbexecuter = BeanFinder::get('dbexecuter');
$this->dbexecuter->mustUseMaster();
$this->max = 400;
}/*}}}*/
示例12: getRealData
private function getRealData(Disease $disease, $diseaseContentList=array())
{/*{{{*/
$res = array();
$zhuanTiInfo = ZhuanTiClient::getInstance()->getZhuaTisByDisease($disease->id);
if (count($zhuanTiInfo)>1)
{
$res['name'] = $disease->name;
$res['url'] = $disease->getUrl();
$res['date'] = date('Y-m-d', time());
$content = "";
if (isset($diseaseContentList[$disease->key]))
{
$content = $this->getContent($diseaseContentList[$disease->key]);
}
$res['content'] = $content;
$res['doctorUrl'] = $disease->getDoctorUrl();
$res['zixunUrl'] = $disease->getZixunUrl();
$zhuanTi1 = array_shift($zhuanTiInfo);
$zhuanTi2= array_shift($zhuanTiInfo);
$res['zhuantiUrl1'] = $zhuanTi1->getUrl();
$res['zhuantiUrl2'] = $zhuanTi2->getUrl();
$res['zhuantiTitle1'] = $zhuanTi1->title;
$res['zhuantiTitle2'] = $zhuanTi2->title;
}
BeanFinder::get('LocalCache')->removeAll();
return $res;
}/*}}}*/
示例13: getData
protected function getData($nowPage, $pageSize)
{/*{{{*/
$hospitalList = DAL::get()->find_all_AllHospital4Sc('hospital', $nowPage, $pageSize);
$departmentDescription = array();
foreach($hospitalList as $hospital)
{
$hospitalFacultyList = HospitalClient::getInstance()->getFacultyList($hospital->id);
foreach($hospitalFacultyList as $hospitalFaculty)
{
if($hospitalFaculty->doctorCnt == 0)
continue;
$tempDescription = array();
$tempDescription['key'] = $hospital->commonName.$hospitalFaculty->name;
$tempDescription['city'] = $hospital->city;
$tempDescription['department'] = $hospitalFaculty->name;
$tempDescription['hospital'] = $hospital->name;
$tempDescription['doctors'] = $this->get3DoctorInfo($hospitalFaculty);
$tempDescription['department_link'] = $hospitalFaculty->getTouchUrl();
$tempDescription['site_name'] = '好大夫在线';
$departmentDescription[] = array('item' => $tempDescription);
}
unset($hospital);
unset($hospitalFacultyList);
BeanFinder::get('LocalCache')->removeAll();
}
unset($hospitalList);
BeanFinder::get('LocalCache')->removeAll();
return $departmentDescription;
}/*}}}*/
示例14: dealError
public function dealError($type, $errorItem)
{
$path = BeanFinder::get('configs')->dicomErrorLog;
$logger = new Logger('dicomerror', $path);
$logger->addError('dicomparse error: ' . $type, array($this->file, $errorItem));
throw new DicomParseException('dicomparse error');
}
示例15: getRelationData
private function getRelationData(Article $article)
{/*{{{*/
$result['link1'] = '';
$result['title1'] = '';
$result['link2'] = '';
$result['title2'] = '';
$relationKey = $article->getKey();
$relationData = RelationSearchClient::getInstance()->search($relationKey, array('article' => 3));
if (isset($relationData['article']) && $relationData['article'])
{
$relationArticles = $relationData['article'];
if (count($relationArticles) > 2)
{
$tempArticle = array();
foreach ($relationArticles as $temp)
{
if($temp->id != $article->id)
{
$tempArticle[] = $temp;
}
unset($temp);
}
$curlResult = array_slice($tempArticle, 0, 2);
$result['articletitle1'] = $curlResult[0]->title;
$result['articletitle2'] = $curlResult[1]->title;
$result['article1'] = $curlResult[0]->getUrl();
$result['article2'] = $curlResult[1]->getUrl();
}
BeanFinder::get('LocalCache')->removeAll();
}
return $result;
}/*}}}*/