當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBC::requireNotNull方法代碼示例

本文整理匯總了PHP中DBC::requireNotNull方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBC::requireNotNull方法的具體用法?PHP DBC::requireNotNull怎麽用?PHP DBC::requireNotNull使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBC的用法示例。


在下文中一共展示了DBC::requireNotNull方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: uploadByWeixin

 public function uploadByWeixin($request, $response)
 {
     $patientId = $request->patientId;
     $spaceId = $request->spaceId;
     $sourceType = $request->sourceType;
     $patient = DAL::get()->find('patient', $patientId);
     $weixUser = DAL::get()->find_by_userid('WeixUser', $patient->user->id);
     DBC::requireNotNull($weixUser, "綁定的微信用戶還沒有生成,請稍等...");
     if($sourceType == 'PatientSignin')
     {
         $patientSignin = DAL::get()->find_by_spaceid_and_patientid('PatientSignin', $spaceId, $patientId);
         $weixDealingEvent = DAL::get()->find_by_weixuserid_and_sourceid("WeixDealingEvent", $weixUser->id, $patientSignin->id);
         if($weixDealingEvent->isNull())
         {
             WeixClient::getInstance()->createWeixDealingEvent($weixUser, $patientSignin);
         }
         $str = "請在微信中拍照上傳門診病曆,完成對".$patientSignin->space->name."的報到";
         WeixApi::kefuTextMsg($weixUser, $str, WeixUser::WEIXINTYPE_PATIENT);
     }
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:20,代碼來源:weixincontroller.php

示例2: aliPayAccess

 public function aliPayAccess($request, $response)
 {
     $hospital = DAL::get()->find('hospital', $request->hospitalid);
     DBC::requireNotNull($hospital, '醫院不存在');
     $response->title = $response->topTitle = $hospital->name;
     $response->aliUrl = array_key_exists($hospital->id, Hospital::$aliPayHospitalUrl) ? Hospital::$aliPayHospitalUrl[$hospital->id] : '';
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:7,代碼來源:hospitalcontroller.php

示例3: submitSignin

 public function submitSignin($request, $response)
 {
     $space = DAL::get()->find('space', $request->spaceId);
     DBC::requireNotNull($space, '醫生不存在,或未開通空間');
     $response->setRedirect($response->router->urlfor('user/register4signin', array('mobile'=>$request->mobile, 'forward'=>$request->forward, 'spaceId'=>$space->id)));
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:6,代碼來源:usercontroller.php

示例4: patientUpload

 public function patientUpload($request, $response)
 {
     /*{{{*/
     $patientId = $request->patientId;
     $patientCaseId = $request->patientCaseId;
     $response->patientId = $patientId;
     $response->patientCaseId = $patientCaseId;
     $list = $this->getPatientCaseandBreadCrumbNavigation($patientCaseId, $patientId);
     $breadcrumbNavigation = $list['breadcrumbNavigation'];
     $patientCase = $list['patientCase'];
     $memList = $memberIds = array();
     if (false == $patientCase->isNull()) {
         $patientCaseId = $patientCase->id;
         $patientIds = DAL::get()->queryValidPatientIds('patientcaseref', $patientCaseId);
         $doctorOwner = DAL::get()->find_by_sourceid('doctorowner', $this->space->id);
         if (false == empty($patientIds)) {
             $memIds = PatientClubClient::getInstance()->getMemberIdByPatientIdAndDoctorOwnerId($patientIds, $doctorOwner->id);
             $memList = DAL::get()->find('regroupmember', $memIds);
         }
         $patientIds = array();
         foreach ($memList as $mem) {
             $patientIds[] = $mem->patient->id;
         }
     } else {
         $patientIds = array($patientId);
     }
     $patientList = DAL::get()->find('patient', $patientIds);
     $groupNames = array();
     foreach ($patientList as $key => $patient) {
         $patientGroups = ForumClient::getInstance()->getGroupListByPatientIdAndSpaceId($patient->id, $this->space->id);
         foreach ($patientGroups as $patientGroup) {
             $groupName = $patientGroup->name;
             $groupNames[$key] = $groupName;
         }
     }
     $interactCounts = $members = array();
     $doctorOwner = DAL::get()->find_by_sourceid('doctorowner', $this->space->id);
     DBC::requireNotNull($doctorOwner, 'doctorOwner不存在');
     if (false == empty($patientIds)) {
         $memberIds = DAL::get()->queryMemberIdByPatientIdAndDoctorOwnerId('regroupmember', $patientIds, $doctorOwner->id);
         foreach ($memberIds as $map) {
             if (false == array_key_exists($map['patientid'], $members)) {
                 $members[$map['patientid']] = DAL::get()->find('regroupmember', $map['id']);
             }
         }
     }
     foreach ($patientIds as $patientId) {
         $interactCount = DAL::get()->queryValidCountOfPatientHad('doctorpatientref', $patientId);
         $interactCounts[$patientId] = $interactCount;
     }
     $response->RecordPatientIds = DAL::get()->queryRecordListByPatientIds('PatientHealthRecord', $patientIds);
     $response->patientList = $patientList;
     $response->groupNames = $groupNames;
     $response->members = $members;
     $response->interactCounts = $interactCounts;
     $response->breadcrumbNavigation = $breadcrumbNavigation;
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:57,代碼來源:adminpatientcontroller.php


注:本文中的DBC::requireNotNull方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。