• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP XDateTime类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中XDateTime的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime类的具体用法?PHP XDateTime怎么用?PHP XDateTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了XDateTime类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: soapServer

 public function soapServer($request, $response)
 {/*{{{*/
     $postdata = file_get_contents("php://input");
     $function = 'soapServer';
     $this->ioLogRecorder->addLog(XDateTime::now()->toString()." service [{$function}] ".$this->ioLogRecorder->format2SimpleLog($postdata));
     $configs = ProviderConfigFactory::getProviderAppConfigs(PhoneConference::SPTYPE_HUAWEI, TeleConfProvider::APPTYPE_CONF);
     $callbackUrl = $configs['callbackUrl'];
     $server = new SoapServer(null, array('uri' => 'HuaweiConfCallback','location'=>$callbackUrl));
     $server->setClass('HuaweiTeleConfApi');
     try
     {
         $lockName = $this->getLockerName($postdata);
         $cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
         $locker  = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
         $locker->getLock($lockName);
         $server->handle();
         $locker->releaseLock($lockName);
     }
     catch(Exception $ex)
     {
         $locker->releaseLock($lockName);
     }
     header("HTTP/1.1 202 Accepted");
     header("Content-Type: text/xml;charset=UTF-8");
     return parent::DIRECT_OUTPUT;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:26,代码来源:huaweiconfcallbackcontroller.php


示例2: doSuggestion

   public function doSuggestion($request, $response)
   {/*{{{*/
       $suggestion = iconv("utf8", "gbk", $request->suggestion);
       $contactInfo = iconv("utf8", "gbk", $request->contactInfo);
       if ($suggestion == '' || $suggestion == '请填写您在使用中遇到的问题(目前暂时不提供疾病咨询服务)')
       {
            echo '{"res":"failure", "msg":"请填写您在使用中遇到的问题!"}';
            return self::DIRECT_OUTPUT;
       }
       if ($contactInfo == '' || $contactInfo == '手机或邮箱')
       {
            echo '{"res":"failure", "msg":"请填写您的联系方式!"}';
            return self::DIRECT_OUTPUT;
       }
       $from = $request->from;

       $content = "来自 ".$from." 的用户(触屏版)发送了一条意见或建议, 内容如下:\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= $suggestion."\n\n";
       $content .= "联系方式: $contactInfo\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= XDateTime::now()->toString();
       $userId = 0;
       $result = UserClient::getInstance()->addUserAdvice('意见建议', $content, $userId);
       if ($result)
       {
            echo '{"res":"success"}';
        }
        else
        {
            echo '{"res":"failure", "msg":"对不起,信息提交失败!"}';
        }
        return self::DIRECT_OUTPUT;
   }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:34,代码来源:suggestioncontroller.php


示例3: add

 public function add($request, $response)
 {
     $diseaseId = $request->diseaseId;
     $params = $request->vars;
     $params['isVoteSelf'] = $request->isVoteSelf;
     if ($vars[threadCategoryId] < 0) {
         unset($vars[threadCategoryId]);
     }
     if (empty($diseaseId)) {
         $key = isset($params['key']) ? $params['key'] : '';
         $name = isset($params['name']) ? $params['name'] : '';
         $diseaseId = DiseaseClient::getInstance()->addDisease($key, $name, $params);
     } else {
         $diseaseId = DiseaseClient::getInstance()->modifyDisease($diseaseId, $params);
         $disease = DAL::get()->find('disease', $diseaseId);
         error_log($response->curOperatorUser->name . ' ' . XDateTime::now() . ' 修改疾病' . $disease->name . ' 的父疾病 为' . $params['parentName'] . "\n\n", 3, '/tmp/modifyparentdisease.log');
         $re_symptom = $request->getRequest('re_symptom', '');
         $re_search_word = $request->getRequest('re_search_word', '');
         $re_location = $request->getRequest('re_location', '');
         $stringList = array(DiseaseRelation::TYPE_SYMPTOM => $re_symptom, DiseaseRelation::TYPE_LOCATION => $re_location);
         DiseaseClient::getInstance()->updateStringRelation($disease->id, array_keys($stringList), $stringList);
     }
     $disease = DAL::get()->find('disease', $diseaseId);
     if ($disease->isNull() == false) {
         Squid::clean($disease->getUrl());
     }
     $msg = urlencode('操作成功');
     $response->setRedirect('/disease/detail?id=' . $diseaseId . '&msg=' . $msg);
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:diseasecontroller.php


示例4: service

 public function service($request, $response)
 {/*{{{*/
     ob_start();
     $result = "";
     $function = $request->service;
     if(method_exists($this, $function))
     {
         try
         {
             $lockName = $this->getLockerName($request);
             $cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
             $locker  = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
             $locker->getLock($lockName);
             $result = $this->$function($request,$response);
             $locker->releaseLock($lockName);
         }
         catch(LockException $ex)
         {
             $this->ioLogRecorder->addLog(XDateTime::now()->toString()."并发锁错误 $lockName\n");
         }
         catch(Exception $ex)
         {
             $locker->releaseLock($lockName);
         }
     }
     echo $result;
     header('Content-Length: ' . ob_get_length());
     return parent::DIRECT_OUTPUT;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:teleconfcallbackcontroller.php


示例5: service

    public function service($request, $response)
    {/*{{{*/
        ob_start();
        $result = $this->callCenterApi->responseCmdNone();
        $function = $this->returnFunction($request);

        if(method_exists($this, $function))
        {
            try
            {
                $lockName = $this->getLockerName($request);
                $cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
                $locker  = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
                $locker->getLock($lockName);
                $result = $this->$function($request,$response);
                $locker->releaseLock($lockName);
            }
            catch(LockException $ex)
            {
                $this->logTxt .= XDateTime::now()->toString()." 并发锁错误 $lockName\n";
            }
            catch(Exception $ex)
            {
                $this->logTxt .= XDateTime::now()->toString()." 释放锁 $lockName\n";
                $locker->releaseLock($lockName);
            }
        }

        echo $result;
        $this->logTxt .= XDateTime::now()->toString().'--->'.print_r($result, true)."\n";
        header('Content-Length: ' . ob_get_length());
        return parent::DIRECT_OUTPUT;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:33,代码来源:callcentercallbackcontroller.php


示例6: addIncidentPost

 public function addIncidentPost($request, $response)
 {
     $followupCustomerId = $request->followupCustomerId;
     $params = $request->arr;
     $vars = $request->vars;
     $incident = DAL::get()->find_by_title_and_followupcustomerid('Incident', $params['title'], $followupCustomerId);
     if ($incident instanceof Incident) {
         throw new BizException('事件名称已存在!');
     }
     $incidentId = IncidentClient::getInstance()->addIncident($followupCustomerId, $params['title'], $params['firstTime'], $params);
     $incident = DAL::get()->find('Incident', $incidentId);
     $followupCustomer = DAL::get()->find('FollowupCustomer', $followupCustomerId);
     $model = DAL::get()->find_by_title('NfsTaskModel', '症状事件');
     $model = array($model);
     $incident = DAL::get()->find('Incident', $incidentId);
     $user = $followupCustomer->getBindUser();
     $assigner = $this->auditor;
     $deadline = XDateTime::tomorrow();
     $taskDesc = "新建症状事件任务";
     $roleId = 825967283;
     //医助的角色id
     $taskId = TaskClient::getInstance()->addTask($model, $incident, $followupCustomer->space, $user, $assigner, $deadline, $taskDesc, $roleId);
     $this->addIncidentStatePostImp($incident, $vars);
     $preMsg = "{$incidentId} 添加成功";
     $response->setRedirect($response->router->urlfor('incident/incidentsofcustomer', array('followupCustomerId' => $followupCustomerId, 'preMsg' => $preMsg)));
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:26,代码来源:incidentcontroller.php


示例7: noReplyProposalCnt

 public function noReplyProposalCnt($request, $response)
 {
     /*{{{*/
     $response->startCtimeOfProposal = $request->getRequest('startCtimeOfProposal', XDateTime::yesterday()->toShortString());
     $response->endCtimeOfProposal = $request->getRequest('endCtimeOfProposal', XDateTime::yesterday()->toShortString());
     $response->startHourOfProposal = $request->getRequest('startHourOfProposal', '09');
     $response->endHourOfProposal = $request->getRequest('endHourOfProposal', '22');
     $response->inspectorUserName = $request->inspectorUserName;
     $startTime = $response->startCtimeOfProposal . ' ' . $response->startHourOfProposal;
     $endTime = $response->endCtimeOfProposal . ' ' . $response->endHourOfProposal;
     $response->startTime = $startTime;
     $response->endTime = $endTime;
     $inspectorId = -1;
     if ($response->inspectorUserName != '') {
         $user = DAL::get()->find_by_fld_UserName('user', $response->inspectorUserName);
         $inspectorId = DAL::get()->find_by_userid('inspector', $user->id)->id;
     }
     $response->inspectorId = $inspectorId;
     $nowPage = $request->getRequest('page', 1);
     $pager = new XPager($nowPage, 20);
     list($cnts, $pageInfo) = DAL::get()->queryNoReplyCntOfSpaceIds('Proposal', $startTime, $endTime, $inspectorId, $pager);
     $spaces = DAL::get()->find('space', array_keys($cnts));
     $response->cnts = $cnts;
     $response->spaces = $spaces;
     $pager->total = $pageInfo['total'];
     $response->pager = $pager;
     $currentBaseUrl = '/proposal/noreplyproposalcnt?';
     $params = array("startCtimeOfProposal" => $response->startCtimeOfProposal, "endCtimeOfProposal" => $response->endCtimeOfProposal, "startHourOfProposal" => $response->startHourOfProposal, "endHourOfProposal" => $response->endHourOfProposal, "inspectorUserName" => $response->inspectorUserName, "page" => '');
     $response->pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate(PageNav::getPageUrlByVars($currentBaseUrl, $params)), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:30,代码来源:proposalcontroller.php


示例8: updateBaseInfo

	public function updateBaseInfo($request, $response)
	{
		$vars = $request->var;
		if ($request->is_ajax) {
			$vars = XString::toGbkDeep($vars);
		}
		if (!empty($vars['birthday']))
			$vars['birthday'] = XDateTime::valueOf($vars['birthday']);
		DoctorClient::getInstance()->modifyByDoctor($this->_newSpace->host->id, $vars);
		
		//调用同步新浪微博接口(更新医生个人信息和修改医生资料)
		//MessageQueueClient::getInstance()->regEvent(new UpdateDoctorInformationSinaWeiboEvent($this->_newSpace->user->id));
		if ($request->is_ajax)
		{
			$results = array(
				'grade' => XString::convertToUnicode($this->_newSpace->host->grade),
				'educate_grade' => XString::convertToUnicode($this->_newSpace->host->educateGrade),
				'specialize' => XString::convertToUnicode($this->_newSpace->host->specialize),
				'intro' => XString::convertToUnicode(XString::truncate($this->_newSpace->host->intro, 100)),
				'status' => 0,
			);
			echo json_encode($results);
			exit;
		}
        $this->message('您的医生资料提交成功!将在1个工作日内审核后生效!', $response, array(
            'buttons' => array(
                array('text' => '继续修改', 'url' => $this->_newSpace->getUrl()."admindoctor/showbaseinfo"),
                array('text' => '进入个人网站', 'url' => $this->_newSpace->getUrl())
            ),
        ));
	
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:32,代码来源:admindoctorcontroller.php


示例9: newArticlePost

	/** 创建文章提交(D,HF) */
    public function newArticlePost($request, $response)
    {/*{{{*/
		if (XString::cntrim($request->getRequest('article_title')) == '') {
			$this->message('文章标题不能为空', $response);
			return false;
        }
        $todayHasArticleNumber = DAL::get()->queryCntOfSpace('Article', $this->_newSpace->id, XDateTime::today()->toString(), XDateTime::tomorrow()->addSecond(-1)->toString());
        if(Article::MAX_CAN_ARTICLE_ONE_DAY_ADD_TWO <= $todayHasArticleNumber)
        {
			$this->message("您今天已经发表了".Article::MAX_CAN_ARTICLE_ONE_DAY_ADD_TWO."篇文章,请您明天再发表", $response);
            return false;
        }

		$categoryId = intval($request->getRequest('category_id', 0));
		$data = array();
        $data['tags'] = $request->article_tags;
        $data['topLevel'] = $request->top_level;
        $data['docAttachmentId'] = $request->getRequest('docAttachmentId', 0);
        $articleSource = intval($request->article_source);
        if(!$articleSource)
        {
            $this->message("文章来源不能为空", $response);
            return false;
        }
		$article = ArticleClient::getInstance()->addArticle($this->_newSpace, $categoryId, $request->article_title, $request->getUnSafeData('article_content'), $articleSource, $data);
		if($article->isNull()){
			$this->message('系统繁忙,请稍后再试', $response, array('text' => '返回文章列表', 
				'url' => $response->router->urlfor('article/index')));
			return false;
		}
		
		$response->setRedirect($this->_newSpace->getUrl().'adminarticle/newpostcomplete?id='.$article->id);
	}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:34,代码来源:adminarticlecontroller.php


示例10: postSuggestion

   public function postSuggestion($request, $response)
   {/*{{{*/
       $suggestion = $request->suggestion;
       if(!$suggestion)  
       {                                           
           return false;                           
       }                                           
       if(strlen($suggestion)<=1)
       {
           $this->message("输入信息过少, 请重新输入!", $response);
           return false;
       }
       $tel = $request->tel;
       $email = $request->email;
       $name = $request->userName;

       $content = "来自 ".$_SERVER['REMOTE_ADDR']." 的用户发送了一条意见或建议, 内容如下:\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= $suggestion."\n\n";
       $content .= "电话: $tel\n";
       $content .= "E-Mail: $email\n";
       $content .= "姓名: $name\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= XDateTime::now()->toString();
       $userId = $request->userid;
       $result = UserClient::getInstance()->addUserAdvice('意见建议', $content, $userId);
       $this->message("信息发送成功, 感谢您对好大夫网站的支持!", $response);
       return false;
   }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:suggestioncontroller.php


示例11: ajaxSaveLog

 /**
  * ajaxSaveLog 
  * @brief 记录voip呼入呼出日志 
  * @author kxy 
  * @version branches/v2.17.3
  * @date 2013-11-19
  */
 public function ajaxSaveLog($request, $response)
 {
     /*{{{*/
     $request->convertToGbk();
     $logStr = XDateTime::now()->toString() . "  座席:" . $this->curOperator->workId . "\n" . print_r($request->voipLog, true) . "\n";
     error_log($logStr, 3, $this->getLogFileName());
     return parent::DIRECT_OUTPUT;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:15,代码来源:voipcontroller.php


示例12: validate

 public function validate()
 {/*{{{*/
     $unexecutedTaskCnt = count(DAL::get()->find_id_afterCtimeAndStatus('QueueTask', XDateTime::today()->addDay(-1), QueueTask::STATUS_UNEXECUTED)); 
     if($unexecutedTaskCnt > self::WARNING_CNT)
     {
         return "定时任务积压:{$unexecutedTaskCnt}";
     }
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:8,代码来源:schemetask.php


示例13: getPayItemList

 public function getPayItemList($pageNo, $pageSize, $startTime, $endTime)
 {
     /*{{{*/
     DBC::requireTrue(XDateTime::getSecondDiffDesc($endTime, $startTime) < 3600, "查询时间不能超过一天");
     $parameter = array("service" => "account.page.query", "partner" => $this->partner, "_input_charset" => $this->_input_charset, "page_no" => $pageNo, "page_size" => $pageSize, "gmt_start_time" => $startTime, "gmt_end_time" => $endTime, "logon_id" => "", "trade_no" => "", "merchant_out_order_no" => "", "deposit_bank_no" => "", "trans_code" => "");
     $alipay = new alipay_service($parameter, $this->security_code, $this->sign_type);
     $url = $alipay->create_url();
     return $url;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:9,代码来源:alipay.php


示例14: modifyDotimePost

 public function modifyDotimePost($request, $response)
 {
     /*{{{*/
     $projectInterviewId = $request->projectInterviewId;
     $projectInterview = DAL::get()->find('ProjectInterview', $projectInterviewId);
     DBC::requireTrue($projectInterview instanceof ProjectInterview, "ProjectInterview {$projectInterviewId} 不存在");
     ProjectInterviewClient::getInstance()->modifyDotime($projectInterviewId, XDateTime::now());
     $preMsg = "启动本次访视";
     $response->setRedirect("/projectanswersheetmgr/listofprojectinterview?projectInterviewId=" . $projectInterviewId . "&preMsg=" . $preMsg);
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:projectinterviewmgrcontroller.php


示例15: sendVerificationCodeEmail

 public function sendVerificationCodeEmail($request, $response)
 {
     /*{{{*/
     if (false == RequestDelegate::isOfficeIp()) {
         echo '系统错误,请联系技术人员!!!';
         exit;
     }
     PrivilegeClient::getInstance()->sendVerificationCodeEmail($request->emailaddress, XDateTime::valueOf($request->starttime), XDateTime::valueOf($request->endtime));
     $response->setRedirect($response->router->urlfor('backyardauth/applytoken?st=ok'));
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:backyardauthcontroller.php


示例16: doAddTelOrderTask

 public function doAddTelOrderTask($request,$response)
 {/*{{{*/
     DBC::requireNotEmptyString($request->spaceId, 'spaceId 不能为空');
     DBC::requireNotEmptyString($request->taskType, 'taskType 不能为空');
     DBC::requireNotEmptyString($request->taskRemark, 'taskRemark 不能为空');
     DBC::requireNotEmptyString($request->executeGroup, 'executeGroup 不能为空');
     $orderId = $request->orderId ? $request->orderId : 0;
     $taskBeginTime = XDateTime::valueOf($request->taskBeginTime);
     $taskBeginTime = $taskBeginTime->before(XDateTime::now())?XDateTime::now()->toString() : $request->taskBeginTime;
     $taskId = TelOrderTaskClient::getInstance()->addTelOrderTask($request->priority, $this->curUser, $request->spaceId, $request->taskType, $this->curUser, $request->executeGroup, $taskBeginTime, $orderId, 0, $request->taskRemark);
     $task = DAL::get()->find('TelOrderTask', $taskId);
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:12,代码来源:telordertaskcontroller.php


示例17: setErrorCode

 public function setErrorCode($value)
 {/*{{{*/
     $this->errorCode = $value;
     $this->content = array();
     $this->msg = $this->getMsg();
     if($value == 203)
     {
         $this->msg = '请检查您的时间是否设置正确, 当前时间为:'.XDateTime::today('Y-m-d H:i')->toStringByFormat('Y-m-d H:i');
     }
     $this->pageInfo = array();
     return $this;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:12,代码来源:basedatabucket.php


示例18: log_trace

 public function log_trace()
 {
     if ($this->switch && in_array($this->debugerName, self::$debugerAry)) {
         try {
             throw new Exception();
         } catch (Exception $ex) {
             $now = XDateTime::now();
             $trace = $ex->getTraceAsString();
             error_log("[{$now}]" . $trace . "\n", 3, "/home/{$this->debugerName}/logs/trace.log");
         }
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:12,代码来源:debugger.php


示例19: getData4Sitemap

 private function getData4Sitemap($urlList)
 {/*{{{*/
     $content = '';
     foreach($urlList as $url)
     {
         $content .= '<url>
                 <loc>'.$url.'</loc>
                     <lastmod>'.XDateTime::now()->toShortString().'</lastmod>
                         <changefreq>daily</changefreq>
                            <priority>0.4</priority>
                               </url>';
     }
     return $content;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:14,代码来源:sitemap4www.php


示例20: confirmToVisit

	public function confirmToVisit($request, $response)
	{/*{{{*/
		$orderId = $request->id;
		$order = DAL::get()->find('BookingOrder', $orderId);
		//患者自己确认去就诊相当于患者电话确认
        DBC::requireTrue(in_array($order->status, array(BookingOrder::STATUS_CONFIRM)), '当前状态不能领取加号凭证');

		$now = XDateTime::now("Y-m-d H:i:s");
		$before2Schedule = $order->schedule->addDay(-2)->setHour("20")->setMinute("00");
        DBC::requireFalse($now < $before2Schedule, '当前状态不能领取加号凭证');

		BookingClient::getInstance()->patientConfirmOrder($order->user,$orderId);
		$response->order = $order;
	}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:14,代码来源:mybookingcontroller.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP XGPCore类代码示例发布时间:2022-05-23
下一篇:
PHP XDB类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap