本文整理匯總了PHP中DBC::requireLess方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBC::requireLess方法的具體用法?PHP DBC::requireLess怎麽用?PHP DBC::requireLess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBC
的用法示例。
在下文中一共展示了DBC::requireLess方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: search
public function search($request, $response)
{
/*{{{*/
$this->privilegeManagement();
$nowPage = $request->page;
$nowPage = isset($nowPage) ? $nowPage : 1;
$searchType = $request->searchtype;
$startTime = $request->starttime;
$endTime = $request->endtime;
if (empty($startTime) == false && empty($endTime) == false) {
//HACK:hc
//如果直接使用日期選擇器,默認沒有時分秒,主動加上
if (strlen($startTime) < 11) {
$startTime .= " 00:00:00";
$endTime .= " 23:59:59";
}
DBC::requireLess($startTime, $endTime, "開始時間必須比結束時間小");
} else {
$startTime = 0;
}
$type = $request->type;
$type = isset($type) ? $type : 0;
$mark = $request->mark;
$mark = isset($mark) ? $mark : 0;
$status = $request->status;
$status = isset($status) ? $status : 0;
$searchText = $request->searchtext;
$searchText = isset($searchText) ? $searchText : "";
//sth.do
list($feedbacklist, $pageInfo) = UserFeedbackClient::getInstance()->search($searchType, $startTime, $endTime, $type, $mark, $status, $searchText, $nowPage, $this::PAGE_SIZE);
$response->feedbacklist = $feedbacklist;
$response->inspector = $this->curInspector;
$response->searchtype = $searchType;
$response->starttime = $startTime;
$response->endtime = $endTime;
$response->type = $type;
$response->mark = $mark;
$response->status = $status;
$response->searchtext = $searchText;
$response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate("/userfeedback/search?\n type=" . $type . "&searchtype=" . $searchType . "&starttime=" . $startTime . "&endtime=" . $endTime . "&mark=" . $mark . "&status=" . $status . "&searchtext=" . $searchText . "&page="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
示例2: addEvent
public function addEvent($request, $response)
{
/*{{{*/
//操作人
$space = DAL::get()->find('space', $request->spaceId);
$orderDateFrom = $request->orderDateFrom . " 00:00:00";
$orderDateTo = $request->orderDateTo . " 23:59:59";
$remark = $request->remark;
$user = $this->curInspector->user;
DBC::requireLess($orderDateFrom, $orderDateTo, "開始時間必須比結束時間小");
//增加事件同時增加任務,方法加到addEvent中
BookingTaskClient::getInstance()->addEvent($space, $user, $orderDateFrom, $orderDateTo, $remark);
$response->doctorName = $space->name;
$response->msg = '添加成功';
}