本文整理汇总了PHP中XString::jsArrayIsEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::jsArrayIsEmpty方法的具体用法?PHP XString::jsArrayIsEmpty怎么用?PHP XString::jsArrayIsEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::jsArrayIsEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}/*}}}*/