本文整理汇总了PHP中XDateTime::getWeek方法的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime::getWeek方法的具体用法?PHP XDateTime::getWeek怎么用?PHP XDateTime::getWeek使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDateTime
的用法示例。
在下文中一共展示了XDateTime::getWeek方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBookingOrderHistoryList
/**
* getBookingOrderList 医生查看自己的加号历史列表
* @exampleUrl http://dev.mobile-api.haodf.com/doctorapi/bookingorder_getbookingorderhistorylist?userId=105133781&type=1&xdebug=1
* @param mixed $userId
* @param mixed $type
* @param mixed $pageId
* @param mixed $pageSize
* @access public
* @return void
*/
public function getBookingOrderHistoryList($userId, $type, $pageId, $pageSize)
{/*{{{*/
$pageSize = MainDataBucket::_initFetchCount($pageSize);
$pageId = MainDataBucket::_initPageId($pageId, $pageSize);
$code = $this->_check($userId);
if($code)
{
$this->setErrorCode($code);
return 0;
}
$type = (empty($type)) ? self::STATUS_SUCCESS : $type;
//已就诊,过期,拒绝,医生取消,患者取消,患者爽约,就诊失败
$status = isset(self::$typeArray[$type]) ? self::$typeArray[$type] : self::STATUS_SUCCESS;
$res = BookingClient::getInstance()->getSpaceOrderList($userId, $status, $pageId, $pageSize);
$pageList = $res['pageInfo'];
$this->pageInfo = array("nowpage" => $pageList['nowpage'], 'pages' =>$pageList['pages'] ,
'total'=>$pageList['total'], 'pagesize' => $pageList['pagesize']);
$results = array();
foreach($res['list'] as $bookingOrder)
{
$order = array();
$time = XDateTime::valueOf($bookingOrder->schedule)->toShortString();
$order['id'] = $bookingOrder->id;
$order['userName'] = $bookingOrder->user->name;
$patient = $bookingOrder->patient;
$order += $this->getBookingOrderPatientMessage($patient);
$disease = str_replace("•", "",
BingLiDtoHelper::create($bookingOrder->getBingLiSource())->getDiseasesStr());
$order['disease'] = $disease;
$order['schedule'] = date('Y-m-d H:i',strtotime($bookingOrder->schedule->toString()));
$order['address'] = $bookingOrder->address;
$order['status'] = $this->getBookingOrderStatus($bookingOrder);
$order['showstatus'] = $bookingOrder->status;
$order['invalidcause'] = $bookingOrder->invalidcause;
$order['phonestatus'] = $bookingOrder->phonestatus;
$order['time'] = $time.' '.XDateTime::getWeek($time);
$results[] = $order;
}
$this->content = $results;
}/*}}}*/
示例2: getOrder
private function getOrder($order, $visitList = array())
{/*{{{*/
$out['id'] = $order->id;
$time = XDateTime::valueOf($order->confirmStartTime);
$year = $time->getYear();
$shortTime = XDateTime::valueOf($order->confirmStartTime)->toShortString();
$out['confirmStartTime'] = $time;
$out['shortTime'] = '1970' == $year ? '待确定' : $time->getMonth().'月'.$time->getDay().'日 '.$time->getHour().':'.$time->getMinute();
$out['time'] = '1970' == $year ? '' : $shortTime.' '.XDateTime::getWeek($shortTime);
$out['minute'] = $order->notification->proposal->product instanceOf Product ? $order->notification->proposal->product->duration.'分钟' : '';
$out['patientName'] = $order->patient->name;
$out['patientId'] = $order->patient->id;
$out['sex'] = ($order->patient->sex ==1) ? '男' : '女';
$out['age'] = $order->patient->birthday && $order->patient->birthday != '--' ? $order->patient->getPatientAge() : '';
$out['area'] = ($order->patient->province == $order->patient->city) ? $order->patient->province : $order->patient->province." ".$order->patient->city;
$out['mobile'] = $order->patient->mobile;
$out['disease'] = $order->getDiseaseName4Flow();
$flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', $order->patient->id, $order->space->id);
$out['flowtitle'] = '';
$out['flowId'] = '';
if(false == $flow->isNull())
{
$out['flowtitle'] = $flow->title;
$out['flowId'] = $flow->id;
}
$out['checkProject'] = '';
$out['bingliType'] = '';
$out['checkTime'] = '';
$telorderTasks = DAL::get()->find_all_by_telorderid('telordertask', $order->id);
krsort($telorderTasks);
$telorderTask = array_shift($telorderTasks);
$out['isConfirmTime'] = ($telorderTask instanceof TelOrderTask && $telorderTask->taskType == TelOrderTask::TYPE_RESERVE_DOC_INFO) ? 1 : 0;
$out += $this->getVisitOrder($order, $visitList);
return $out;
}/*}}}*/