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


PHP DBC::requireNotEmpty方法代碼示例

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


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

示例1: paySms

 public function paySms($request, $response)
 {
     /*{{{*/
     $phoneNumbers = $request->phoneNumbers;
     $content = $request->content;
     DBC::requireNotEmpty($phoneNumbers, '手機號不能為空!');
     DBC::requireNotEmptyString($content, '內容不能為空!');
     SMSClient::getInstance()->sendAsync($phoneNumbers, $content, SMSLog::OPT_TYPE_TEL_ZIXUN);
     $response->setRedirect($response->router->urlfor('serviceorder/showdetail', array('id' => $request->id, 'msg' => '短信發送成功!')));
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:10,代碼來源:serviceordercontroller.php

示例2: reportInfo

    public function reportInfo($request,$response)
    {/*{{{*/
        $spaceId = $request->spaceid;
        $weixUserId = $this->getWeixUserIdFromRequest();
        DBC::requireNotEmpty($weixUserId,"weixUserId不能為空");
        DBC::requireNotEmpty($spaceId,"spaceId不能為空");
        $nickName = DAL::get()->find('weixuser',$weixUserId)->nickname;
        $response->nickName = $nickName;

        $response->weixUserId = $weixUserId;
        $response->userPhone = $userPhone = $request->userPhone;
        $response->disease = $disease = $request->disease;
        $response->patientName = $patientName = $request->patientName;
        $space = DAL::get()->find('space',$spaceId);
        $response->spaceName = $space->name;
        $response->spaceId = $spaceId;
    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:17,代碼來源:weixincontroller.php

示例3: auditSave

    public function auditSave($request, $response)
    {/*{{{*/
        $result = "";
        $orderId = $request->orderId;
        $order = DAL::get()->find('telorder', $orderId, true);
        if ($order->executer->isGroup())
        {
            throw new BizException('親,這個是群.請先綁定醫生再試試看~');
        }
        $phonePurpose = $request->purpose;
        DBC::requireNotEmpty($phonePurpose, '通話目的不可為空');
        DBC::requireNotEmptyString($request->userVisit['Course'], '病程不可為空');
        DBC::requireNotEmptyString($request->userVisit['OutPatient'], '門診就診不可為空');
        $purpose = implode(",", $phonePurpose);

        $params = array('diseaseCourse'=>(int)$request->userVisit['Course'],
            'outPatientService'=>(int)$request->userVisit['OutPatient'],
            'phonePurpose'=>$purpose,
            'title'=>$request->orderTitle);
        $telOrderId = TelOrderClient::getInstance()->updateAuditOrder($orderId,$this->curUser, $params);
        $response->telOrder = $order;
        $response->setRedirect($response->router->urlfor('telorder/orderdetail', array('orderId'=>$orderId, 'msg'=>$result))."#msg");
    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:23,代碼來源:telordercontroller.php

示例4: getQpayAccessUrl

    private function getQpayAccessUrl()
    {
		$configs = BeanFinder::get('configs');
        if(isset($configs->qpayAccessUrl)) 
        {
            return $configs->qpayAccessUrl;
        }
        DBC::requireNotEmpty('','QpayAccessUrl配置不可為空');
    }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:9,代碼來源:followupcontroller.php

示例5: initial2bu

 private function initial2bu($request)
 {
     /*{{{*/
     DBC::requireNotEmpty($request->buGroupIds, 'BU組不能為空');
     DBC::requireNotEmptyString($request->patientid, '患者id不能為空');
     $group = $this->getInitialGroup($request->groupid);
     $patient = DAL::get()->mustFind('patient', $request->patientid);
     $inspectResultDtoArr = $this->getInspectResultDtoArr($patient, $group, Intention::STATUS_UNAUDIT, $request->buGroupIds);
     InspectClient::getInstance()->batchNext($patient, $this->curInspector, $group, $inspectResultDtoArr);
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:10,代碼來源:intentioncontroller.php

示例6: bindDiseaseExperience

 public function bindDiseaseExperience($request, $response)
 {/*{{{*/
     $diseaseKeys = $request->diseasekey;
     DBC::requireNotEmpty($diseaseKeys, "疾病信息不能為空");
     AskSessionInfo::bindPatientInfos(NodeObj::NODE_DEFINE_DISEASE, $diseaseKeys);
     $request->keys = implode(",", $diseaseKeys);
     $request->type = "disease";
     $this->ajaxSetAskSession($request, $response);
     $patientTreatmentInfo = AskSessionInfo::getPatientInfos(NodeObj::NODE_DEFINE_TREATMENT);
     if(false == empty($patientTreatmentInfo))
     {
         $response->setRedirect($response->router->urlfor('newcase/treatmentexperiencewithpatient'));
     }
     else
     {
         $response->setRedirect($response->router->urlfor('newcase/choosetreatmentexperience'));
     }
 }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:18,代碼來源:newcasecontroller.php

示例7: updateEntity

	public function updateEntity($entityType, $entityId, $args)
	{
	        DBC::requireNotEmptyString($entityType, '實體名不可為空');
	        DBC::requireNotEmptyString($entityId, '實體Id不可為空');
	        DBC::requireNotEmpty($args, '要更新的參數不可為空');
		self::checkEntityType($entityType);
		BeanFinder::get('dbexecuter')->mustUseMaster();
		$entityObject = DAL::get()->find($entityType, $entityId);
		foreach ($args as $key => $value) {
			$entityObject->$key = $value;
		}
		return $entityObject->id;
	}
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:13,代碼來源:basesvc.php

示例8: refuseContract

 public function refuseContract($request, $response)
 {/*{{{*/
     DBC::requireNotEmpty($request->deleteReason, '刪除說明必填!');
     $telContract = DAL::get()->find('telContract', $request->telContractId); 
     $request->deleteReason .= TelContract::DELETE_MARK_CONTENT;
     $response->space = $this->_newSpace;
     $response->setRedirect($response->router->urlfor('adminpayment/showcontractlist'));
 }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:8,代碼來源:adminpaymentcontroller.php

示例9: payOrder

 private function payOrder($orderIds, $userId)
 {
     /*{{{*/
     DBC::requireNotEmpty($orderIds, '訂單Id不可為空');
     DBC::requireNotEmpty($userId, '用戶Id不可為空');
     $orders = DAL::get()->find('serviceOrder', $orderIds);
     $user = DAL::get()->mustFind('User', $userId);
     $accountTotal = 0;
     foreach ($orders as $orderItem) {
         $accountTotal += $orderItem->price;
     }
     if ($user->getCashAccount()->amount >= $accountTotal) {
         foreach ($orders as $order) {
             ServiceOrderClient::getInstance()->pay($order, $this->curInspector->user);
         }
     } else {
         die('餘額不足,隻認領不付款');
     }
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:19,代碼來源:comprehensivetaskcontroller.php

示例10: updatePost

 public function updatePost($request, $response)
 {
     $id = $request->id;
     $space = DAL::get()->find('Space', $id);
     DBC::requireFalse($space->isNull(), '編輯對象為空');
     $vars = $request->getUnSafeData('vars');
     DBC::requireNotEmpty($vars, '編輯對象為空');
     if (isset($vars['note1'])) {
         $offlineTime = $request->offline_year . '-' . $request->offline_month . '-' . $request->offline_day;
         $vars['offlineNoteValidTime'] = strtotime($offlineTime);
     }
     if (isset($vars['caseOpened']) || isset($vars['caseapplyopened'])) {
         $caseOpened = isset($vars['caseOpened']) ? $vars['caseOpened'] : '';
         unset($vars['caseOpened']);
         $caseapplyopened = isset($vars['caseapplyopened']) ? $vars['caseapplyopened'] : '';
         unset($vars['caseapplyopened']);
         SpaceClient::getInstance()->setCaseAndCaseApplyStatus($this->_newSpace, $caseOpened, $caseapplyopened);
     }
     $this->rebuildBookingTask($space, $vars);
     $r = SpaceClient::getInstance()->setProperties($id, $vars);
     if ($r) {
         $response->setRedirect("/space/edit?id={$id}&msg=" . urlencode('更新成功'));
     }
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:24,代碼來源:spacecontroller.php

示例11: breakIfLessMessage

    private function breakIfLessMessage($request, $response)
    {/*{{{*/
        $mustMessages = array(
            'case_title' => '標題',
            'case_disease_tag' => '疾病',
            'case_prehospital' => '最後就診醫院',
            'case_prekeshi' => '就診科室',
        );

        foreach($mustMessages as $inputName => $name)
        {
            $t = $request->$inputName;
            DBC::requireNotEmpty($t, $name.' 不能為空');
        }
    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:15,代碼來源:threadcontroller.php

示例12: updateInspector

 public function updateInspector($request, $response)
 {
     /*{{{*/
     $inspectorId = $request->id;
     $realName = $request->realName;
     $inGroupIds = $request->getRequest('groupIds', array());
     $allGroupIds = $request->allGroupIds;
     $outOfGroupIds = array_diff($allGroupIds, $inGroupIds);
     $email = $request->email;
     $role = $request->role;
     $tag = 0;
     if (empty($inspectorId)) {
         $userName = $request->getRequest('userName', '');
         DBC::requireNotEmpty($userName, '請填寫用戶名');
         $user = DAL::get()->find_by_name('user', $userName);
         DBC::requireFalse($user->isNull(), '請填寫正確的用戶名,無法找到此用戶');
         $inspector = DAL::get()->find_by_userid('inspector', $user->id);
         if (false == $inspector->isNull()) {
             if (false == $inspector->isActived()) {
                 DBC::requireTrue(false, '該用戶已被刪除,請重新注冊');
             }
         } else {
             $inspectorId = InspectorClient::getInstance()->createInspector($user, $email, $realName, $role, $inGroupIds, $outOfGroupIds, $this->curInspector);
         }
         $tag = 1;
     } else {
         $inspector = DAL::get()->find('inspector', $inspectorId);
         InspectorClient::getInstance()->updateInspector($inspector, $email, $role, $realName, $inGroupIds, $outOfGroupIds, $this->curInspector);
     }
     $url = $response->router->urlfor('intentiongroup/showinspector', array('id' => $inspectorId, 'app' => $request->app, 'tag' => $tag));
     $response->setRedirect($url);
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:32,代碼來源:intentiongroupcontroller.php

示例13: authAlipayUserInfo

    private function authAlipayUserInfo($request, $response)
    {/*{{{*/
        $alipayOpenApi = new AlipayOpenApi();
        $res = $alipayOpenApi->getAlipaySystemOauthTokenRequest($request->auth_code);

        $accessToken = $res->alipay_system_oauth_token_response->access_token;
        $alipayUserId = $res->alipay_system_oauth_token_response->alipay_user_id;
        error_log(XDateTime::now()." accessToken=".$accessToken." alipayUserId=".$alipayUserId."\n", 3, BeanFinder::get('configs')->logFilePath."alipay_auth.log");
        DBC::requireNotEmptyString($accessToken, "用戶授權失敗,請返回重試!");
        DBC::requireNotEmptyString($alipayUserId, "用戶授權失敗,請返回重試!");

        $userInfoRes = $alipayOpenApi->getAlipayUserUserinfoShareRequest($accessToken);
        $retUserInfos = $userInfoRes->alipay_user_userinfo_share_response;
        DBC::requireNotEmpty($retUserInfos, "用戶授權失敗,請返回重試!");
        error_log(XDateTime::now()." alipayUserId=".$alipayUserId."   ".print_r($retUserInfos, true)."\n\n", 3, BeanFinder::get('configs')->logFilePath."alipay_auth.log");

        $alipayUser = MobileClient::getInstance()->genAlipayUser($alipayUserId);
        $entityKeyValues = $alipayUser->__dump();
        $tmpEntityFields = array_keys($entityKeyValues);
        $entityFields = array();
        foreach ($tmpEntityFields as $field)
        {
            $entityFields[] = strtolower($field);
        }
        $params = array();
        foreach ($retUserInfos as $key => $value)
        {
            $entityKey = 'alipay'.str_replace('_', '', $key);
            if (in_array($entityKey, $entityFields))
            {
                $params[$entityKey] = mb_convert_encoding($value,'GBK','UTF-8');
            }
        }
        DBC::requireNotEmpty($params, "用戶授權失敗,請返回重試!");
        MobileClient::getInstance()->updateAlidayUser($alipayUser->alipayuserid, $params);

        $response->user = $this->forceLogin($alipayUser->userId);
        $this->user = $response->user;
error_log(print_r($this->user, true), 3, "/tmp/alipay1.log");
        return $alipayUser;
    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:41,代碼來源:alipayapicontroller.php

示例14: appendSyncKeyInOptions

 protected static function appendSyncKeyInOptions(array $options, $firstKey)
 {
     /*{{{*/
     $keys = func_get_args();
     unset($keys[0]);
     DBC::requireNotEmpty($keys, 'keys不能為空');
     foreach ($keys as $key) {
         DBC::requireTrue(is_string($key) || is_int($key), 'key隻能是字符串或者數字');
     }
     $key = implode('_', $keys);
     $options['synchronized'] = true;
     $options['synchronizedKey'] = $key;
     return $options;
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:14,代碼來源:baseclient.php

示例15: joinParam

 private function joinParam($params)
 {
     /*{{{*/
     DBC::requireNotEmpty($params, 'params參數不可為空');
     $out = '';
     foreach ($params as $key => $val) {
         $out .= $this->checkNull($key, $val);
     }
     return $out;
 }
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:10,代碼來源:qpay.php


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