本文整理汇总了PHP中Area::isProvince方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::isProvince方法的具体用法?PHP Area::isProvince怎么用?PHP Area::isProvince使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::isProvince方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildData
protected function buildData($nowPage, $pageSize, $hospitalList, $area)
{/*{{{*/
$hospitalRes = array();
if(count($hospitalList) >= 5)
{
$formData = $this->getSanjiaHospitalGroup($hospitalList);
$hospital = array_shift($hospitalList);
$area = $hospital->$area;
$province = Area::getProvKeyByName($hospital->province, 'all');
$city = Area::retrieveCityEnglishName($hospital->province, $province, $hospital->city);
$cityEng = Area::isProvince($area)?"":$city."/";
$hospitalRes['item']['key'] = $area."三甲医院";
$hospitalRes['item']['url'] = "http://www.haodf.com/yiyuan/".$province."/".$cityEng."list.htm?level=6";
$hospitalRes['item']['title'] = $area."地区三甲医院_门诊时间,专家推荐_好大夫在线";
$hospitalRes['item']['showurl'] = "www.haodf.com";
$hospitalRes['item']['pagesize'] = rand(60,60).'K';
$hospitalRes['item']['date'] = date('Y-m-d',time());
$hospitalRes['item']['content'] = "提供".$area."地区".count($hospitalList)."家三甲医院的医院等级、地址、预约电话及专家门诊时间查询;根据患者的就医经验,推荐".$area."地区专家,另有在线医生提供免费咨询...";
$hospitalRes['item']['linkurl'] = $hospitalRes['item']['url'];
$hospitalRes['item']['linkcontent'] = "查看".($cityEng?$hospital->city:$hospital->province)."所有三甲医院";
$hospitalRes['item'][] = $formData;
}
return $hospitalRes;
}/*}}}*/
示例2: getData
protected function getData($nowPage, $pageSize)
{/*{{{*/
$facultyIds = FacultyClient::getInstance()->getFacultyListByOption($nowPage, $pageSize);
$faculties = DAL::get()->find('Faculty', $facultyIds['ids']);
$provinces = Area::getAllProvinceNameList();
$provinces[] = "全国";
$res = array();
foreach ($faculties as $faculty)
{
$info['key'] = $faculty->name;
$offices = $doctorInfos = array();
foreach ($provinces as $province)
{
if (Area::isZXS($province))
{
$cities = array($province);
}
elseif($province == "全国")
{
$cities = array("全国");
}
else
{
$cities = Area::getProvinceCities($province);
$cities[] = $province;
}
foreach ($cities as $city)
{
$options = array();
$options['facultyId'] = $faculty->id;
$options['orderBy']['rank'] = true;
$options['isVirtual'] = 0;
$options['hospitalIsActivated'] = 1;
if ($city != "全国")
{
if (Area::isProvince($city) || Area::isZXS($city))
{
$options['province'] = $city;
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($city).".htm";
}
else
{
$options['city'] = $city;
$str = Area::retrieveCityEnglishName($province, Area::getProvKeyByName($province), $city);
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($province).".htm?city=".$str;
}
}
else
{
$areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/all.htm";
}
$hospitalfaculties = HospitalFacultyClient::getInstance()->getHospitalFacultyByOption(1, 30, $options);
if (false == empty($hospitalfaculties))
{
$office['area'] = $city;
$office['areaurl'] = $areaUrl;
foreach ($hospitalfaculties as $hospitalfaculty)
{
if ($hospitalfaculty->doctorCount < 1)
{
continue;
}
$officeInfo['office']['officename'] = $hospitalfaculty->hospital->name.$hospitalfaculty->name;
$officeInfo['office']['city'] = $hospitalfaculty->hospital->city;
$officeInfo['office']['officeurl'] = $hospitalfaculty->getUrl();
$officeInfo['office']['aptitude'] = $hospitalfaculty->hospital->getGradeStr();
$officeInfo['office']['gooddoctornum'] = $hospitalfaculty->doctorCount;
$officeInfo['office']['votenum'] = $hospitalfaculty->rank;
$office[] = $officeInfo;
$officeInfo = array();
}
$offices[] = array('offices' =>$office);
$office = array();
}
$page = $params = array();
$page['nowPage'] = 1;
$page['pageSize'] = 30;
$doctorList = DoctorClient::getInstance()->getDoctorBetweenFaculty($faculty->id, $faculty->id+1, $options, $page);
if (false == empty($doctorList['list']))
{
$doctors['area'] = $city;
$pre = "all";
if ($city != "全国")
{
$pre = Area::getProvKeyByName($province);
}
$doctors['areaurl'] = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/daifu/".$pre.".htm";
$doctorInfo = array();
foreach ($doctorList['list'] as $doctor)
{
if (74154 != $doctor->id && $doctor->hospitalfaculty->hospital->isActivated && $doctor->hospitalfaculty->hospital->name != "未收录医院")
{
$doctors['doctor']['doctorname'] = $doctor->name;
$doctors['doctor']['doctorurl'] = $doctor->getUrl();
$doctors['doctor']['doctorgrade'] = $doctor->grade ? $doctor->grade : " ";
$doctors['doctor']['doctorjob'] = $doctor->educateGrade ? $doctor->educateGrade : " ";
//.........这里部分代码省略.........
示例3: dirname
$topTitle = '按医院找医生';
include_once dirname(__file__).'/../_headergohome.php'
?>
<div class="mt15 ml10 mr10 bg_w b_ra5">
<a href="<?=$router->urlfor('hospital/mynearhospitallist')?>" onclick="return authorizeLocation(this)" style="display:block"><p class="dis_con pt15 pb15 ml10 mr10 lh140 gray6 f17">我附近的大医院</p></a>
<p class="clear_b"></p>
</div>
<div class="mt10 ml10 mr10 bg_w b_ra5">
<?php foreach ($areaList as $areaName => $provinces) {?>
<div class="f_t19 hos_area bt_e pt10 clear_l"><?=$areaName?>地区</div>
<ul class="dis_n_list pt10">
<?php foreach ($provinces as $displayName) {
if (Area::isProvince($displayName))
{
$areaUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => Area::getProvKeyByName($displayName),
'cityKey' => HospitalController::ALL_CITY_KEY,
));
} else {
$cityName = $displayName;
$provinceName = Area::getProvinceByCity($cityName);
$provinceKey = Area::getProvKeyByName($provinceName);
$cityKey = Area::retrieveCityEnglishName($provinceName, $provinceKey, $cityName);
$areaUrl = $router->urlfor('hospital/hospitallist', array(
'provinceKey' => $provinceKey,
'cityKey' => $cityKey,
));
}