當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。