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


PHP TPage::execute方法代码示例

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


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

示例1: execute

 /**
  * Executes page lifecycles for a callback request
  *
  * If the page is requested is not a service request
  * - Execute the normal page lifecycles @see TPage::execute()
  *
  * If the page is requested in response to a AJAX request
  * (may be a Callback request) then
  * - OnInit event
  * - OnLoad event
  * - ** execute service **
  * - OnUnload event
  * - ** flush server outputs **
  *
  * If the page is requested in response to a valid Callback request, then
  * - OnInit event
  * - ** initialize the server request **
  * - ** load post data from request **
  * - load viewstate
  * - load post data
  * - OnLoad event
  * - load post data (for newly created components during Load event)
  * - ** raise callback event **
  * - OnUnload event
  * - ** flush server outputs **
  *
  * @see TPage::execute()
  */
 public function execute()
 {
     //Callback life-cycle
     if ($this->service->isServiceRequest()) {
         if ($this->Application->getApplicationState() == TApplication::STATE_DEBUG) {
             //let the callback server handle errors and exceptions
             $server = $this->service->server();
             set_error_handler(array($server, 'handleError'));
             set_exception_handler(array($server, 'handleException'));
         }
         $this->onPreInit(new TEventParameter());
         $this->determinePostBackMode();
         $this->onInitRecursive(new TEventParameter());
         $this->service->register($this);
         //a valid callback request
         if ($this->isCallBack()) {
             $this->service->server()->initialize();
             $this->service->loadCallBackPostData();
             $state = $this->loadPageStateFromPersistenceMedium();
             $this->loadViewState($state);
             $this->loadPostData();
             $this->onLoadRecursive(new TEventParameter());
             $this->loadPostData();
             /** raise post back data changed or not? **/
             //$this->raisePostDataChangedEvents();
             //$this->handlePostBackEvent();
         } else {
             $this->onLoadRecursive(new TEventParameter());
         }
         $this->service->execute();
         $this->onUnloadRecursive(new TEventParameter());
         $this->service->server()->flush();
     } else {
         //normal page execution cycle
         parent::execute();
     }
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:65,代码来源:TCallbackPage.php

示例2: execute

 function execute()
 {
     if ($this->isServiceRequest()) {
         $this->onPreInit(new TEventParameter());
         $this->determinePostBackMode();
         $this->onInitRecursive(new TEventParameter());
         $this->service->setPostDataKeys($this->postDataContainerIDs);
         if ($this->isCallBack()) {
             $this->service->loadCallBackPostData();
             try {
                 $state = $this->loadPageStateFromPersistenceMedium();
                 $this->loadViewState($state);
                 $this->loadPostData();
                 $this->onLoadRecursive(new TEventParameter());
                 $this->loadPostData();
                 $this->raisePostDataChangedEvents();
                 $this->handlePostBackEvent();
             } catch (Exception $e) {
                 if ($this->Application->getApplicationState() == TApplication::STATE_DEBUG) {
                     trigger_error($e->getMessage());
                 }
             }
         } else {
             $this->onLoadRecursive(new TEventParameter());
         }
         $this->registerCallbackHandler($this, $this->getCallbackCandidateDescriptions());
         $this->Application->getServiceManager()->execute(TService_Callback::service);
         $this->onUnloadRecursive(new TEventParameter());
     } else {
         parent::execute();
     }
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:32,代码来源:TPageWithCallback.php


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