本文整理汇总了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 = '添加成功';
}