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


PHP Codec::getInstance方法代码示例

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


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

示例1: delete

    public function delete( $request,$response )
    {/*{{{*/
        $subId = (int)Codec::getInstance()->decodeId($request->subid);

        SubscriptionClient::getInstance()->deleteSubscriptDisease( $subId );
        $response->setRedirect( $response->router->urlfor( "subscriptdisease/showindex" ) );
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:subscriptdiseasecontroller.php

示例2: before

 public function before($context)
 {
     $doctorId = Codec::getInstance()->decodeId($context->request->id);
     $action = $context->action;
     if($context->controller == 'doctor' && $context->action == 'showreply')
     {
         $comment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($context->request->commentid);
         $doctorId = $comment->doctor->id;
     }
     if($context->controller == 'doctor' && $context->action == 'addcomment')
     {
         $doctorId = $context->request->doctor_id;
     }
     if($context->controller == 'paper' && $context->action == 'showcmstagtypelist')
     {
         $doctorId = $context->request->searchParam;
     }
     $redirectActionArray = array(
         'showdetail'
         ,'commentlist'
         ,'addcomment'
         ,'showcmstagtypelist'
         ,'showreply'
         );
     $doctorIds = DAL::get()->find_id_by_hospitalfacultyid('doctor', 0);
     $isInRedirectActionArray = in_array($action, $redirectActionArray);
     $isInDoctorList = in_array($doctorId, $doctorIds);
     if($isInRedirectActionArray && $isInDoctorList)
     {
         $context->response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/dissociatedoctornotice.php');
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:32,代码来源:dissociatedoctorinterceptor.php

示例3: getData

 protected function getData($nowPage, $pageSize)
 {/*{{{*/
     $dataList = $this->prepareData($nowPage, $pageSize);
     $res = array();
     foreach ($dataList as $data)
     {
         $tempData = array();
         $tempData['item']['key'] = $data['dname'].'医院';
         $tempData['item']['url'] = 'http://haoping.haodf.com/jibing/'.$data['dkey'].'/yiyuan.htm';
         $tempData['item']['showUrl'] = XString::truncate('haoping.haodf.com/jibing/'.$data['dkey'].'/yiyuan.htm', 38, '...');
         $tempData['item']['title'] = $data['dname']."推荐医院_好大夫在线";
         $tempData['item']['pageSize'] = rand(58, 62).'K';
         $tempData['item']['date'] = date('Y-m-d', time());
         $tempData['item']['content'] = "各地".$data['dname']."医院就医指南";
         foreach ($data['formdata'] as $key => $form)
         {
             $data['formdata'][$key]['form']['diseaseHospitalUrl'] = 'http://haoping.haodf.com/hospital/'.Codec::getInstance()->encodeId($form['form']['hid']).'/'.$data['dkey'].'.htm';
             unset($form);
         }
         $tempData['item'] = $tempData['item'] + $data['formdata'];
         $res[] = $tempData;
         unset($data);
    }
     return $res;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:25,代码来源:diseasehospitalinfo.php

示例4: loadMoreCase

    public function loadMoreCase($request, $response) 
    {/*{{{*/
        if (is_numeric($request->doctorid))
        {
            $this->_exit404();
        }

        $doctorId = (int)Codec::getInstance()->decodeId($request->doctorid);
        if((int)$doctorId <= 0)
        {
            $this->_exit404();
        }
        $doctor = DAL::get()->find('Doctor', $doctorId);
        if($doctor->isNull() || !$doctor->hasSpace())
        {
            $this->_exit404();
        }
        $space = $doctor->space;
        $response->doctor = $doctor;
        $response->space = $space;
        $response->doctorSpaceIsOpened = $doctor->hasSpace() && $space->isOpened();

        $nowPage = $request->getRequest('p', 1);

        $res = FlowClient::getInstance()->getFlowList($response->space->id, $nowPage, self::PAGESIZE);
        $response->flowList = $res['list'];
        $response->nowPage = $nowPage;
        $response->pages = $res['pageInfo']['pages'];
        $response->loadUrl = $response->touchUrl.'/case/loadmorecase?doctorid='.$request->doctorid.'&p=';
        $response->title = $doctor->name."大夫患者咨询_好大夫在线";
        $response->topTitle = "咨询列表";
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:32,代码来源:casecontroller.php

示例5: __construct

 public function __construct($request, $response) {
     parent::__construct($request, $response);
     
     $facultyId = Codec::getInstance()->decodeId($request->id);
     if ( (int)$facultyId <= 0) {
         $this->_exit404();
     }
     $this->_faculty = DAL::get()->find('faculty', $facultyId);
     if ($this->_faculty->isNull()) {
         $this->_exit404();
     }
     
     $this->_facultyIdFrom = $this->_faculty->id;
     $this->_facultyIdTo = $this->_faculty->id + $this->_faculty->mask;
     $area = new Area();
     $this->_provInfo = $area->provInfo();
     $this->_prov = $request->prov;
     if (empty($this->_prov))
         $this->_prov = $request->province;
     $this->_otherProv = explode(',', $this->_provInfo['q']['Province']);
     $this->_areaName = empty($this->_provInfo[$this->_prov]['Name']) ? '' : $this->_provInfo[$this->_prov]['Name'];
     $this->_provinceStr = str_replace(',', "','", $this->_areaName);
     $this->_p = $request->getRequest('p', 1);
     
     $response->faculty = $this->_faculty;
     $response->areaName = $this->_areaName;
     $response->provInfo = $this->_provInfo;
     $response->prov = $this->_prov;
     $response->isShowPhone = in_array($this->_faculty->name, self::$askLinks);
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:30,代码来源:facultycontroller.php

示例6: index

 public function index($request, $response)
 {
     $doctorId   = $this->_newSpace->host->id;
     $doctorUserId   = $this->_newSpace->user->id;
     $doctor = DAL::get()->find( 'User', $doctorUserId );
     $encodeId   = Codec::getInstance()->encodeId($doctorId);
     $hezuoList      = array(
                         $doctor->realName.'个人网站'=>'http://'."$doctor->name".'.haodf.com',
                         '好大夫在线'.$doctor->realName.'信息中心页'  =>'http://www.haodf.com/doctor/'.$encodeId.'.htm#schedule',
                         '搜狐'.$doctor->realName.'信息中心页'       =>'http://haodf.health.sohu.com'.'/doctor/'.$encodeId.'.htm',
                         '新浪'.$doctor->realName.'信息中心页'       =>'http://hospitalize.news.sina.com'.'/doctor/'.$encodeId.'.htm',
                         '腾讯'.$doctor->realName.'信息中心页'       =>'http://health.qq.haodf.com'.'/doctor/'.$encodeId.'.htm',
                         '新华网'.$doctor->realName.'信息中心页'     =>'http://xinhua.haodf.org'.'/doctor/'.$encodeId.'.htm',
                         '人民网 '.$doctor->realName.'信息中心页'     =>'http://haodf.people.com.cn'.'/doctor/'.$encodeId.'.htm',
                         '新浪亲子'.$doctor->realName.'信息中心页'   => 'http://qiuyi.baby.sina.com.cn'.'/doctor/'.$encodeId.'.htm',
                         '摇篮网'.$doctor->realName.'信息中心页'     =>'http://haodf.yaolan.com'.'/doctor/'.$encodeId.'.htm',
                         '太平洋亲子'.$doctor->realName.'信息中心页' =>'http://haodf.pckids.com.cn'.'/doctor/'.$encodeId.'.htm',
                         '太平洋女性网'.$doctor->realName.'信息中心页' =>'http://haodf.pclady.com.cn'.'/doctor/'.$encodeId.'.htm',
                         '大众网健康'.$doctor->realName.'信息中心页' =>'http://haodf.health.dzwww.com'.'/doctor/'.$encodeId.'.htm',
                         '人民健康保险'.$doctor->realName.'信息中心页'=>'http://haodf.picchealth.com'.'/doctor/'.$encodeId.'.htm',
                         '凤凰网'.$doctor->realName.'信息中心页'    =>'http://haodf.health.ifeng.com'.'/doctor/'.$encodeId.'.htm',
                         'msn'.$doctor->realName.'信息中心页'       =>'http://wenda.health.msn.com.cn'.'/doctor/'.$encodeId.'.htm',
                             );
     $sinaUser = DAL::get()->find_sinauser_by_spaceid('weibouser', $doctorUserId);
 	$tencentUser = DAL::get()->find_tencentuser_by_spaceid('weibouser', $doctorUserId);
     $response->sinaUser = $sinaUser;
     $response->tencentUser = $tencentUser;
     $response->hezuoList = $hezuoList;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:webmessagecontroller.php

示例7: getUserIdByPatientAttachment

 private function getUserIdByPatientAttachment($context)
 {/*{{{*/
     $encodeId = $context->request->id;
     $patientAttachmentId = Codec::getInstance()->decodeId($encodeId);
     $patientAttachment = DAL::get()->find('patientattachment',$patientAttachmentId);
     return $patientAttachment->user->id;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:patientattachinterceptor.php

示例8: getRealData

 private function getRealData($facultyObj)
 {/*{{{*/
     $res = array();
     $res['name'] = $facultyObj->name;
     $res['id'] = Codec::getInstance()->encodeId($facultyObj->id);
     $res['intro'] = strip_tags($facultyObj->intro);
     unset($facultyObj);
     return $res;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:9,代码来源:facultyinfo4hzhospital.php

示例9: validTesterDoctor

    private function validTesterDoctor($request)
    {
		$doctorId = (int)Codec::getInstance()->decodeId($request->id);
        $doctor = DAL::get()->find('Doctor', $doctorId);
    	if($doctor->isNull() == false && $doctor->hospitalfaculty->hospital->isInnerTestHospital() && false == RequestDelegate::isOfficeIp())
        {
    		header('Location: http://www.haodf.com');
			exit;
    	}
    }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:testerauthinterceptor.php

示例10: buildData

    private function buildData($hospitalFacultys, $doctors)
    {/*{{{*/
        $resArray = array();
        foreach ($hospitalFacultys as $hospitalFaculty)
        {
            $hospital = $hospitalFaculty->hospital;
            $faculty = $hospitalFaculty->faculty;
            $isPlus = PlussignChannelClient::getInstance()->isHospitalFacultyBookDoctor($hospital->name, $faculty->name);
            $keyWord = $hospital->commonName.$hospitalFaculty->name;
            if($isPlus)
            {
                $content1 = "提供".$doctors[$hospitalFaculty->id]."等".
                    $hospitalFaculty->doctorCount."位大夫的擅长、门诊时间查询,".
                    $keyWord.$hospitalFaculty->spaceCount."位大夫提供免费网上咨询,另外有"
                    .count($isPlus)."位大夫提供预约加号服务。";
                $hospitalEncode = Codec::getInstance()->encodeId($hospital->name);
                $facultyEncode = Codec::getInstance()->encodeId($faculty->name);
                $url3 = "http://www.".URL_PREFIX."haodf.com/jiahao/search.htm?district=".$isPlus[0].
                    "&hospitalName=".$hospitalEncode."&facultyName=".$facultyEncode;
            }
            else
            {
                $content1 = '提供'.$doctors[$hospitalFaculty->id].
                    '等'.$hospitalFaculty->doctorCount.'位大夫的擅长、门诊时间查询,'.
                    $keyWord.$hospitalFaculty->spaceCount.'位大夫提供免费网上咨询。';
                $hasArticle = ArticleClient::getInstance()->hasArticleInHospitalFaculty($hospitalFaculty->id);
                $url3 = '';
                if(false == empty($hasArticle))
                {
                    $url3 = $hospitalFaculty->getWenZhangUrl();
                }
                BeanFinder::get('LocalCache')->removeAll(); 
            }
            $url4 = $hospital->getReMapUrl();

            $resArray[$hospitalFaculty->id]['item'] = array(
                'keyword'=>$keyWord,
                'url'=>$hospitalFaculty->getUrl(),
                'creator'=>'haodf.com',
                'title'=>$hospital->commonName.$hospitalFaculty->name." 好大夫在线",
                'publishdate'=>date('Y-m-d', time()),
                'content1'=>$content1,
                'url1'=>$hospitalFaculty->getScheduleUrl(),
                'url2'=>$hospitalFaculty->getDoctorUrl(),
                'url3'=>$url3,
                'url4'=>$url4,
            );
            unset($hospitalFaculty);
            BeanFinder::get('LocalCache')->removeAll(); 
        }
        unset($hospitalFacultys, $doctors);
        return $resArray;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:53,代码来源:hospitalfaculty4sososummary.php

示例11: before

 public function before($context)
 {
     $doctorId = Codec::getInstance()->decodeId($context->request->doctor_id);
     $action = $context->action;
     $redirectActionArray = array(
         'step1account'
         ,'showreply'
         );
     $doctorIds = DAL::get()->find_id_by_hospitalfacultyid('doctor', 0);
     $isInRedirectActionArray = in_array($action, $redirectActionArray);
     $isInDoctorList = in_array($doctorId, $doctorIds);
     if($isInRedirectActionArray && $isInDoctorList)
     {
         $context->response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/dissociatedoctornotice.php');
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:16,代码来源:dissociatedoctorinterceptor.php

示例12: index

 public function index($request, $response)
 {
     /*{{{*/
     $phoneNumber = '';
     if (is_numeric($request->phonenumber)) {
         $phoneNumber = $request->phonenumber;
     } else {
         $phoneNumber = Codec::getInstance()->decodeId($request->phonenumber);
     }
     if ($this->curOperator->isOffWork()) {
         //$this->cleanCookie();
         $response->setRedirect('/operator/login');
     }
     $response->showPhoneNumber = XString::hiddenTelNumber($phoneNumber);
     $response->userName = $request->username;
     $response->phoneNumber = $phoneNumber;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:operatorcontroller.php

示例13: getRealData

 private function getRealData($thankLetter)
 {/*{{{*/
     $res = array();
     $res['id'] = $thankLetter->id;
     $res['doctorId'] = Codec::getInstance()->encodeId($thankLetter->doctorId);
     if (false == $thankLetter->doctor->isNull())
     {
         $res['doctorName'] = $thankLetter->doctor->name;
     }
     if (false == $thankLetter->doctor->isNull() && false == $thankLetter->doctor->hospitalfaculty->isNull())
     {
         $res['hospitalFacultyId'] = $thankLetter->doctor->hospitalfaculty->getEncodeId();
     }
     $res['content'] = strip_tags($thankLetter->content);
     $res['patient'] = $thankLetter->user->isNull()?$thankLetter->ipLocation : XString::truncate($thankLetter->user->name, 1, "***");
     $res['ctime'] = $thankLetter->ctime;
     return $res;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:18,代码来源:thankletter4hzhospital.php

示例14: initialize

 private function initialize($request, $response) 
 {/*{{{*/
     if (is_numeric($request->id))
     {
         $this->_exit404();
     }
     $hospitalFacultyId = Codec::getInstance()->decodeId($request->id);
     if ( (int)$hospitalFacultyId <= 0) 
     {
         $this->_exit404();
     }
     $this->hospitalFaculty = DAL::get()->find('hospitalfaculty', $hospitalFacultyId);
     if ($this->hospitalFaculty->isNull()) 
     {
         $this->_exit404();
     }
     $response->hospitalFaculty = $this->hospitalFaculty;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:18,代码来源:hospitalfacultycontroller.php

示例15: getDisHospital

    private function getDisHospital($hospitalList)
    { /*{{{*/
        $diseaseHospital = array();
        $formData = array();

        foreach($hospitalList as $item)
        {
            $hospitals = $item['hospital'];
            $disease = $item['disease'];

            if (count($hospitals) == 5)
            {
                foreach ($hospitals as $n => $hospital)
                {
                    $formData[$n]['form']['hoscomname'] = str_replace(array('&', '<', '>'), "", $hospital['hoscomname']);
                    $formData[$n]['form']['hosprovince'] = $hospital['hosprovince'];
                    $formData[$n]['form']['hosgrade'] = Hospital::$GradeDefine[$hospital['hosgrade']];
                    $formData[$n]['form']['votecnt'] = $hospital['votecnt'];
                    $formData[$n]['form']['doctorcnt'] = $hospital['doctorcnt'];
                    $formData[$n]['form']['haopinglink'] = 'http://haoping.haodf.com/hospital/'.Codec::getInstance()->encodeId($hospital['hid']).'/'.$disease['key'].'.htm';
                    unset($hospital);
                }
                if (false == empty($disease['thesaurus']))
                {
                    $diseaseNames = $disease['name'].','.$disease['thesaurus'];
                    $diseaseNames = explode(',',$diseaseNames);
                    $diseaseNames = array_unique($diseaseNames);
                    foreach ($diseaseNames as $Key => $diseaseName)
                    {
                        $diseaseHospital[] = $this->getDiseaseHospitalGroup($disease, $diseaseName, $formData);
                        unset($diseaseName);
                    }
                }
                else
                {
                    $diseaseName = $disease['name'];
                    $diseaseHospital[] = $this->getDiseaseHospitalGroup($disease, $diseaseName, $formData);
                }
            }
            unset($item);
        }    
        unset($hospitalList);
        return $diseaseHospital;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:44,代码来源:diseasehospitalallarea.php


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