当前位置: 首页>>代码示例>>PHP>>正文


PHP Area::getNameByEnglishName方法代码示例

本文整理汇总了PHP中Area::getNameByEnglishName方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::getNameByEnglishName方法的具体用法?PHP Area::getNameByEnglishName怎么用?PHP Area::getNameByEnglishName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Area的用法示例。


在下文中一共展示了Area::getNameByEnglishName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: hospitalList

    public function hospitalList($request, $response)
    {/*{{{*/
        $nowPage = $request->getRequest('p',1);
        $pageSize = 6;
        $prov = $request->prov;
        $city = $request->getRequest('city','');
        $cityName = Area::getNameByEnglishName($prov, $city, $city);
        $provInfo = array_merge(Area::provInfo(), Area::provInfoAppend());
        $proName = $provInfo[$prov]['Province'];
        $cities = HospitalClient::getInstance()->getHospitalCityList($proName);

        $options = array();
        $options['city'] = $cityName;
        $options['prov'] = $proName;
        $options['isActivated'] = true;
        $options['noTestData'] = true;
        $options['orderBy'] = ' fld_HospitalDoctorCount desc ';
        $res = HospitalClient::getInstance()->getList($nowPage, $pageSize, $options);
        $response->total = $res['pageInfo']['total'];
        if (false == empty($city))
        {
            $pageLink = PageNav::getNavLink(PageNav::getBaiduappPageNavTemplate("/baiduapp/hospital/".$prov."/".$city."/list.htm?p=", 1, 5, 1, true, false, false, ''),$res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
        }
        else
        {
            $pageLink = PageNav::getNavLink(PageNav::getBaiduappPageNavTemplate("/baiduapp/hospital/".$prov."/list.htm?p=", 1, 5, 1, true, false, false, ''),$res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
        }
        $hospitalList = $res['list'];
        $hospitalIds = array_keys($hospitalList);
        if(empty($hospitalIds) == false)
        {
            $openBookingCount = HospitalClient::getInstance()->getHospitalPlussignCount($hospitalIds);
            $response->openBookingCount = $openBookingCount;
        }
        $response->proName = $proName;
        $response->cities = $cities;
        $response->hospitalList = $hospitalList;
        $response->prov = $prov;
        $response->city = $city;
        $response->pageLink = $pageLink;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:41,代码来源:appcontroller.php

示例2: hospitalList

    public function hospitalList($request, $response)
    {/*{{{*/
        $prov = $request->getRequest('prov', 'all'); 
        $city = $request->getRequest('city', '');
        $mprov = isset($_COOKIE['b']['mprov'])?$_COOKIE['b']['mprov']:'';
        if($prov == 'all')
        {
            if($mprov)
            {
                $prov = $mprov;
            } else {
                $prov = 'beijing';
            }
        }

        $response->triage = $request->triage;
        $provInfo = array_merge(Area::provInfo(), Area::provInfoAppend());
        unset($provInfo['q']);

        //如果取得的城市是英文拼音,则寻找它的中文名称
        $city = Area::getNameByEnglishName($prov, $city, $city);
        $level = $request->getRequest('level', '');
        $hospitalLevel = array(6=>'三甲', 5=>'三级', 4=>'二甲', 3=>'二级', 2=>'一甲', 1=>'一级');

        $hospitalConfig = array();
        $hotHospitalIds = isset($hospitalConfig[$prov]) ? $hospitalConfig[$prov] : '';

        $citys = array();
        $proName = $provInfo[$prov]['Province'] ? $provInfo[$prov]['Province'] : '北京';
        $citys = HospitalClient::getInstance()->getHospitalCityList($proName);

        $provinceAry = $provInfo[$prov]['Province'];
        $provinceAry = (is_array($provinceAry) == false) ? array($provinceAry) : $provinceAry;
        $options = array();
        $options['city'] = $city;
        $options['level'] = $level;
        $hospitalList = HospitalClient::getInstance()->getListByProvinceAry($provinceAry, $options);
        $newHospitalList = array();
        foreach($hospitalList as $hospital)
        {
            if ($hospital->city == $hospital->province && '吉林' != $hospital->city)
                $newHospitalList[$hospital->province][$hospital->district][] = $hospital;
            else
                $newHospitalList[$hospital->province][$hospital->city][] = $hospital;
        }
        $hospitalList = &$newHospitalList;
        unset($newHospitalList);
        foreach ($hospitalList as $k => $province)
        {
            uasort($hospitalList[$k], 'sort_hospital');
        }

        $hotSearchWords = array(
            "上海华山医院","北京肿瘤医院","北京协和医院","上海瑞金医院","华西医院","浙二医院","广东省人民医院","北京同仁医院","上海红房子医院","南京军区总医院"
        );
        //随机选取搜索词
        $searchWords = array();
        $searchWordsLength = 0;
        $searchWordsLengthMax = 56;
        while ($searchWordsLength < $searchWordsLengthMax)
        {
            $randWord = $hotSearchWords[rand(0, count($hotSearchWords) - 1)];
            if (!in_array($randWord, $searchWords))
            {
                $searchWords[] = $randWord;
                $searchWordsLength += strlen($randWord);
            }
        }
        unset($hotSearchWords, $searchWordsLength, $searchWordsLengthMax, $randWord);

        //取地区域名
        $titleLevel = '';
        if ($level)
        {
            $titleLevel = $hospitalLevel[$level].'医院_';
        }
        $titleArea = $provInfo[$prov]['Name'];
        if ($city)
        {
            $titleArea .= '_'.$city;
        }

        $modifiedTriageCity = isset($_COOKIE['b']['mcity'])? $_COOKIE['b']['mcity']:'';
        $modifiedTriageCity = mb_convert_encoding($modifiedTriageCity, 'gbk', 'auto');
        $triageProvince = Area::getProvinceByCity($modifiedTriageCity);
        $triageProvinceName = Area::getProvKeyByName($triageProvince);

        $response->triageProvince = $triageProvinceName;
        $response->title_level = $titleLevel;
        $response->title_area = $titleArea;
        $response->citys = $citys;
        $response->distinct = $city;
        $response->level = $level;
        $response->hospitalLevel = $hospitalLevel;
        $response->hotHospitalIds = $hotHospitalIds;

        $response->prov = $prov;
        $response->provInfo = $provInfo;
        $response->hospitalList = $hospitalList;
        $sanjiaHospitalCount  =count($hospitalList);
//.........这里部分代码省略.........
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:101,代码来源:indexcontroller.php

示例3: hospitalList

    public function hospitalList($request, $response)
    {/*{{{*/
        $provInfo = array_merge(Area::provInfo(), Area::provInfoAppend());
        $provinceKey = $request->getRequest('provinceKey', self::ALL_PROVINCE_KEY);
        $provinceName = $provInfo[$provinceKey]['Name'];
        $cityKey = $request->getRequest('cityKey', self::ALL_CITY_KEY);
        $cityName = Area::getNameByEnglishName($provinceKey, $cityKey, '');

        $hospitalList = HospitalClient::getInstance()->getHospitalByProvinceAndCity($provinceName, $cityName);
        $hospitalInfos = HospitalClient::getInstance()->groupHospitalByCategory($hospitalList);

        $featuredFaculty = $request->getRequest('featuredFaculty', '');
        foreach ($hospitalInfos as $key => $hospitalInfo)
        {
            if ($featuredFaculty && $featuredFaculty != $key)
            {
                unset($hospitalInfos[$key]);
            }
        }
        $response->featuredFaculty = $featuredFaculty;

        $response->provinceKey = $provinceKey;
        $response->provinceName = $provinceName;
        $response->cityName = ($cityName)?$cityName:'全部';
        $response->cityKey = $cityKey;
        $response->hospitalInfos = $hospitalInfos;
        $response->title = $provinceName.$cityName."地区医院_好大夫在线";
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:28,代码来源:hospitalcontroller.php


注:本文中的Area::getNameByEnglishName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。