当前位置: 首页>>代码示例>>PHP>>正文


PHP XDateTime::addDaysFromNow方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:24,代码来源:spacebusinessrequirementcontroller.php

示例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;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:22,代码来源:bookingcontroller.php


注:本文中的XDateTime::addDaysFromNow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。