本文整理汇总了PHP中XDateTime::addDaysFromNow方法的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime::addDaysFromNow方法的具体用法?PHP XDateTime::addDaysFromNow怎么用?PHP XDateTime::addDaysFromNow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDateTime
的用法示例。
在下文中一共展示了XDateTime::addDaysFromNow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateSchedule
public function updateSchedule($request, $response)
{
/*{{{*/
$response->id = $request->id;
$schedule = SpaceBusinessRequirement::$scheduleDef;
$spaceBusinessRequirement = DAL::get()->find('SpaceBusinessRequirement', $request->id);
if ($spaceBusinessRequirement->serializedSchedule) {
$schedule = $spaceBusinessRequirement->serializedSchedule;
}
$response->spaceBusinessRequirement = $spaceBusinessRequirement;
//预约时间列表
$response->schedule = $schedule;
//停诊列表:获取半年前的停诊,并按ctime倒序排列
$bind = array();
$bind[':spaceid'] = $spaceBusinessRequirement->space->id;
$bind[':startTime'] = XDateTime::addDaysFromNow(-180);
$where = " spaceid = :spaceid and endtime > :startTime order by ctime desc ";
$stopDiagnoseList = DAL::get()->find_all_by_condition('stopdiagnose', $where, $bind);
$response->stopDiagnoseList = $stopDiagnoseList;
$backUrl = $request->backurl;
if (empty($backUrl) == false) {
$response->setRedirect($backUrl);
}
}
示例2: showDoctorMovementTask
public function showDoctorMovementTask($request, $response)
{
/*{{{*/
$id = $request->taskId;
$doctorMovementTask = DAL::get()->find('BookingTask', $id);
$doctor = $doctorMovementTask->relatedObject;
$space = $doctor->space;
$response->space = $space;
//todo::yyp
//$response->contract = DAL::get()->find_by_ownerid_and_type('Contract', $space->user->getTelowner()->id, ServiceDef::TYPE_BOOKING);
$response->requirement = $space->getSpaceBusinessRequirement4Booking();
$response->task = $doctorMovementTask;
$operator = $doctorMovementTask->getAuditor();
$response->operator = $operator->isNull() == false ? $operator->realName : '无操作人';
//停诊列表:获取半年前的停诊,并按ctime倒序排列
$bind = array();
$bind[':spaceid'] = $space->id;
$bind[':startTime'] = XDateTime::addDaysFromNow(-180);
$where = " spaceid = :spaceid and endtime > :startTime order by ctime desc ";
$stopDiagnoseList = DAL::get()->find_all_by_condition('stopdiagnose', $where, $bind);
$response->stopDiagnoseList = $stopDiagnoseList;
}