本文整理汇总了PHP中DBC::requireNotEmptyString方法的典型用法代码示例。如果您正苦于以下问题:PHP DBC::requireNotEmptyString方法的具体用法?PHP DBC::requireNotEmptyString怎么用?PHP DBC::requireNotEmptyString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBC
的用法示例。
在下文中一共展示了DBC::requireNotEmptyString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp($currentSystemCode, $useRemoteCache = self::REMOTE_CACHE_USED) {
if ($this->isSetup() == false)
{
DBC::requireNotEmptyString($currentSystemCode);
$this->currentSystemCode = $currentSystemCode;
BeanFinder::register('currentSystemCode', $this->currentSystemCode);
$this->useRemoteCache = $useRemoteCache;
include(dirname(__FILE__).'/dalsetting.php');
$this->orgDbConfigs['dbwrite'] = $dbwrite;
$this->orgDbConfigs['dbread'] = $dbread;
DAL::get()->registerDb($dbConfigs);
DAL::get()->registerMsDb($msDbConfigs);
DAL::get()->registerRemoteCache($caches);
DAL::get()->registerGearman($gearmanConfigs);
DAL::get()->initSession($sessionSavePaths);
DAL::get()->registerRedis($redisConfigs);
if (isset($this->dbConfigs[$currentSystemCode]))
{
BeanFinder::register('dbexecuter', $this->getDbExecuter());
}
$this->isSetup = true;
}
return $this;
}
示例2: 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' => '短信发送成功!')));
}
示例3: showDetail
public function showDetail($request, $response)
{/*{{{*/
DBC::requireNotEmptyString($request->id, "ID不能为空!");
DBC::requireTrue(class_exists($request->type, "无效的病历类型!"));
$source = DAL::get()->find($request->type, $request->id);
if ($source->isNull())
{
throw new BizException('病历资料不存在!');
}
$response->bingliSet = BingLiDtoClient::getInstance()->getBingLiByRelatedObj($source);
$response->patient = $source->patient;
$response->callback = $request->callback;
}/*}}}*/
示例4: ajaxSetDoctorCount
public function ajaxSetDoctorCount($request, $response)
{
/*{{{*/
$request->convertToGbk();
$type = $request->type;
$count = $request->count;
DBC::requireNotEmptyString($type, 'type不能为空');
DBC::requireTrue(is_numeric($count), '医生数量必须是数值');
DBC::requireNotEmptyString($request->diseasePageId, 'diseasepageid不能为空');
DiseasePageClient::getInstance()->setDoctorCount($request->diseasePageId, $type, $count);
echo 'ok';
return parent::DIRECT_OUTPUT;
}
示例5: setProviderConfigs
public function setProviderConfigs($request, $response)
{
if (!$this->curOperator->isOperatorAdmin()) {
throw new TelConfException('抱歉,此座席无权限查看!');
}
$spType = $request->spType;
$appType = $request->appType;
DBC::requireNotEmptyString($spType, 'spType不能为空');
DBC::requireNotEmptyString($appType, 'appType不能为空');
$response->callcenterProvider = DAL::get()->find_by_sptype('teleconfprovider', $spType);
$providerConfig = ProviderConfigFactory::createProviderConfig($spType, $appType);
$response->appUrlList = $providerConfig->returnAppUrlList();
}
示例6: getDoctorInfo
public function getDoctorInfo($request,$response)
{
$doctorId = $request->doctorid;
DBC::requireNotEmptyString($doctorId, '医生Id不能为空');
$doctor = DAL::get()->find('doctor', $doctorId);
$doctorInfo = '';
if (false == $doctor->isNull())
{
$doctorInfo = $doctor->hospitalfaculty->hospital->name.$doctor->hospitalfaculty->faculty->name." ".$doctor->name;
}
$doctorInfo = array('doctorInfo' => mb_convert_encoding($doctorInfo,'utf-8','gbk'));
echo json_encode($doctorInfo);
exit;
}
示例7: addPost
public function addPost($request, $response)
{
/*{{{*/
$name = $request->name;
$keyword = $request->keyword;
DBC::requireNotEmptyString($name, "name不存在");
DBC::requireNotEmptyString($keyword, "keyword不存在");
$keyworddesc = $request->keyworddesc;
$pGroupTpl = PlaceClient::getInstance()->addPGroupTpl($name, $keyword, $keyworddesc);
$msg = '添加失败 原因:pGroupTpl ' . $name . "已存在";
if ($pGroupTpl instanceof PGroupTpl) {
$msg = '添加成功';
} else {
die($msg);
}
$url = $response->router->urlfor('pgrouptpl/alllist', array('msg' => $msg));
$response->setRedirect($url);
}
示例8: addPost
public function addPost($request, $response)
{
$name = $request->name;
$ename = $request->ename;
$content = $request->getPost('content');
DBC::requireNotEmptyString($name, "name不存在");
DBC::requireNotEmptyString($ename, "ename不存在");
DBC::requireNotEmptyString($content, "content不存在");
$paperTpl = PaperClient::getInstance()->addPaperTpl($ename, $name, $content);
$msg = '添加失败 原因:paperTpl ' . $ename . "已存在";
if ($paperTpl instanceof PaperTpl) {
$msg = '添加成功';
} else {
die($msg);
}
$url = $response->router->urlfor('papertpl/alllist', array('msg' => $msg));
$response->setRedirect($url);
}
示例9: addPost
public function addPost($request, $response)
{
$name = $request->name;
$ename = $request->ename;
$precontent = $request->getPost('precontent');
$suffcontent = $request->getPost('suffcontent');
DBC::requireNotEmptyString($name, "name不存在");
DBC::requireNotEmptyString($ename, "ename不存在");
DBC::requireNotEmptyString($precontent, "precontent不存在");
DBC::requireNotEmptyString($suffcontent, "suffcontent不存在");
$subunitTpl = PaperClient::getInstance()->addSubunitTpl($name, $ename, $precontent, $suffcontent);
$msg = '添加失败 原因:subunitTpl ' . $ename . ' 已存在';
if ($subunitTpl instanceof SubunitTpl) {
$msg = '添加成功';
} else {
die($msg);
}
$url = $response->router->urlfor('chiptpl/listofsubunittpl', array('msg' => $msg, 'subunitTplId' => $subunitTpl->id));
$response->setRedirect($url);
}
示例10: addPost
public function addPost($request, $response)
{
/*{{{*/
$keyword = $request->keyword;
DBC::requireNotEmptyString($keyword, "keyword不存在");
$name = $request->name;
DBC::requireNotEmptyString($name, "name不存在");
$content = html_entity_decode($request->getPost('content'));
$pGroupTplId = $request->pGroupTplId;
$pGroupTpl = DAL::get()->find('pGroupTpl', $pGroupTplId, true);
DBC::requireTrue($pGroupTpl instanceof PGroupTpl, "PGroupTpl {$pGroupTplId} 不存在");
$placeTpl = PlaceClient::getInstance()->addPlaceTpl($pGroupTpl, $name, $keyword, $content);
$msg = '添加失败 原因:pGroup ' . $name . "已存在";
if ($placeTpl instanceof PlaceTpl) {
$msg = '添加成功';
} else {
die($msg);
}
$url = $response->router->urlfor('placetpl/listofpgrouptpl', array('pgrouptplid' => $pGroupTplId, 'msg' => $msg));
$response->setRedirect($url);
}
示例11: addPost
public function addPost($request, $response)
{
/*{{{*/
$keyword = $request->keyword;
DBC::requireNotEmptyString($keyword, "keyword不存在");
$pGroupTplId = $request->pGroupTplId;
$pGroupTpl = DAL::get()->find('pGroupTpl', $pGroupTplId, true);
DBC::requireTrue($pGroupTpl instanceof PGroupTpl, "PGroupTpl {$pGroupTplId} 不存在");
$name = $request->name;
$previewUrl = $request->previewurl;
$editor = $this->curOperatorUser;
$pGroup = PlaceClient::getInstance()->addPGroup($pGroupTpl, $name, $keyword, $previewUrl, $editor);
$msg = '添加失败 原因:pGroup ' . $keyword . "已存在";
if ($pGroup instanceof PGroup) {
$msg = '添加成功';
} else {
die($msg);
}
$url = $response->router->urlfor('place/showlist', array('pGroupId' => $pGroup->id, 'msg' => $msg));
$response->setRedirect($url);
}
示例12: init
private static function init($path, $encoding)
{
/*{{{*/
DBC::requireTrue(is_dir($path), '未知的path:' . $path);
mb_internal_encoding($encoding);
// just to make php use & as the separator when adding the PHPSESSID
// variable to our requests
ini_set("arg_seperator.output", "&");
ini_set("magic_quotes_runtime", 0);
$configFile = $path . '/config/config.php';
DBC::requireTrue(is_file($configFile), '未知的config.php');
include $configFile;
if (isset($configs['includePath']) && $configs['includePath']) {
set_include_path($configs['includePath']);
}
$configs = new Configuration($configFile);
BeanFinder::register('configs', $configs);
DBC::requireNotEmptyString($configs->system, '未知系统code,请检查config中是否配置了system项');
DBC::requireNotEmptyString($configs->env, '未知系统env,请检查config中是否配置了system项');
self::initDebug($configs->env);
DAL::get()->setUp($configs->system);
Logger::setUp($configs->system);
}
示例13: ajaxSubmitReview
public function ajaxSubmitReview($request, $response)
{
/*{{{*/
$ticketId = $request->getRequest('passedTicketId', 0);
DBC::requireNotEmptyString($ticketId, "passedTicketId 不能为空");
$ticket = DAL::get()->find("NfsTaskTicket", $ticketId);
$remark = mb_convert_encoding($request->remark, 'gbk', 'utf-8');
if ($request->result != NfsTaskTicket::REVIEW_RESULT_UNREVIEW) {
NfsAuditClient::getInstance()->review($this->auditor, $ticketId, $request->result, $remark);
}
$ticket = DAL::get()->find("NfsTaskTicket", $ticketId, true);
if (false == $ticket->isReviewed()) {
echo '';
} else {
$reviewAuditor = $ticket->getReviewAuditor();
$resultArr = array();
$resultArr['result'] = NfsTaskTicket::$reviewResultDes[$ticket->reviewResult];
$resultArr['reviewAuditorName'] = $reviewAuditor->isNull() ? "" : $reviewAuditor->realName;
$resultArr['reviewTime'] = $ticket->reviewTime->toString();
$resultArr['reviewRemark'] = $ticket->reviewRemark;
mb_convert_variables('utf-8', 'gbk', $resultArr);
echo json_encode($resultArr);
}
return parent::DIRECT_OUTPUT;
}
示例14: sendMsg
public function sendMsg($request, $response)
{
/*{{{*/
$msg = $request->msg;
DBC::requireNotEmptyString($msg, "消息不能为空!!!");
$wxUser = DAL::get()->find('WxUser', $request->wxUserId);
DBC::requireTrue($wxUser instanceof WxUser, "WxUser不存在!!!");
WxApi::kefuTextMsg($wxUser, $msg);
$toUser = $wxUser->nickname;
WxMgrClient::getInstance()->addAdminReplyMsg($msg, $toUser);
$response->setRedirect($_SERVER["HTTP_REFERER"]);
}
示例15: ajaxgetdata4chart
public function ajaxgetdata4chart($request, $response)
{/*{{{*/
DBC::requireNotEmptyString($request->categorykey, 'categoryKey不可为空');
$lastTime = XDateTime::valueOf($request->lasttime);
$response->lastTime = $lastTime;
$startTime = $lastTime->addDay(-30);
$response->startTime = $startTime;
$response->centerTitle = '';
switch ($request->categorykey)
{/*{{{*/
case HealthRecordProblem::CHART_BLOODPRESSURE:
$response->bloodJsonDataArr = HealthRecordClient::getInstance()->getBloodJsonData4StateSummaryChart($request->userid, $startTime->toShortString(), $lastTime->toShortString());
$high = isset($response->bloodJsonDataArr['high']) ? $response->bloodJsonDataArr['high'] : 0;
$low = isset($response->bloodJsonDataArr['low']) ? $response->bloodJsonDataArr['low'] : 0;
if(XString::jsArrayIsEmpty($high) && XString::jsArrayIsEmpty($low))
{
$response->centerTitle = '这30天没有血压记录';
}
break;
case HealthRecordProblem::CHART_HEARTRATE:
$response->heartRateJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::HEARTRATE_TITLE, $startTime, $lastTime);
if(XString::jsArrayIsEmpty($response->heartRateJson))
{
$response->centerTitle = '这30天没有心率记录';
}
break;
case HealthRecordProblem::CHART_WEIGHT:
$response->weightJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::WEIGHT_TITLE, $startTime, $lastTime);
if(XString::jsArrayIsEmpty($response->weightJson))
{
$response->centerTitle = '这30天没有体重记录';
}
break;
case HealthRecordProblem::CHART_SHITSINGLE:
$response->pinkShitJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::PINKSHIT_TITLE, $startTime, $lastTime);
$response->blackShitJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::BLACKSHIT_TITLE, $startTime, $lastTime);
$response->yellowShitJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::YELLOWSHIT_TITLE, $startTime, $lastTime);
$response->redShitJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::REDSHIT_TITLE, $startTime, $lastTime);
$response->whiteShitJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::WHITESHIT_TITLE, $startTime, $lastTime);
if(XString::jsArrayIsEmpty($response->pinkShitJson) &&
XString::jsArrayIsEmpty($response->blackShitJson) &&
XString::jsArrayIsEmpty($response->yellowShitJson) &&
XString::jsArrayIsEmpty($response->redShitJson) &&
XString::jsArrayIsEmpty($response->whiteShitJson)
)
{
$response->centerTitle = '这30天没有大便记录';
}
break;
case HealthRecordProblem::CHART_SHITTOTAL:
$response->totalShitJson = HealthRecordClient::getInstance()->getShitTatalJsonData($request->userid, $startTime, $lastTime);
$response->shitJsonHashData = HealthRecordClient::getInstance()->getShitJsonHashData($request->userid, $startTime, $lastTime);
if(XString::jsArrayIsEmpty($response->totalShitJson))
{
$response->centerTitle = '这30天没有大便记录';
}
break;
case HealthRecordProblem::CHART_CDAI:
$startTime = $lastTime->addYear(-1);
$response->startTime = $startTime;
$response->cdaiJson = HealthRecordClient::getInstance()->getAnswerJsonData4StateSummaryChart($request->userid, HealthRecordProblem::CDAI_TITLE, $startTime, $lastTime);
if(XString::jsArrayIsEmpty($response->cdaiJson))
{
$response->centerTitle = '这一年没有CDAI记录';
}
break;
}/*}}}*/
return $request->categorykey;
}/*}}}*/