当前位置: 首页>>代码示例>>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;未经允许,请勿转载。