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


PHP xajaxResponseManager::getInstance方法代码示例

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


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

示例1: processRequest

 function processRequest()
 {
     if ($this->canProcessRequest()) {
         $aSections =& $this->_getSections($this->sRequest);
         //			echo "<!--" . print_r($aSections, true) . "-->";
         // validate the hash
         $sHash = md5(implode($aSections));
         if (false == $this->bValidateHash || $sHash == $this->sHash) {
             $sType = 'text/javascript';
             if ('style' == $this->sRequest) {
                 $sType = 'text/css';
             }
             $objResponse =& new xajaxCustomResponse($sType);
             foreach ($aSections as $sSection) {
                 $objResponse->append($sSection . "\n");
             }
             $objResponseManager =& xajaxResponseManager::getInstance();
             $objResponseManager->append($objResponse);
             header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60 * 60 * 24) . ' GMT');
             return true;
         }
         return 'Invalid script or style request.';
         trigger_error('Hash mismatch: ' . $this->sRequest . ': ' . $sHash . ' <==> ' . $this->sHash, E_USER_ERROR);
     }
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:25,代码来源:xajaxScriptPlugin.inc.php

示例2: call

 public function call($aArgs = array())
 {
     $objResponseManager = xajaxResponseManager::getInstance();
     if (NULL != $this->sInclude) {
         ob_start();
         require_once $this->sInclude;
         $sOutput = ob_get_clean();
         //SkipDebug
         if (0 < strlen($sOutput)) {
             $sOutput = 'From include file: ' . $this->sInclude . ' => ' . $sOutput;
             $objResponseManager->debug($sOutput);
         }
         //EndSkipDebug
     }
     $mFunction = $this->uf;
     $objResponseManager->append(call_user_func_array($mFunction, $aArgs));
 }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:17,代码来源:xajaxUserFunction.inc.php

示例3: xajaxCustomResponse

 function xajaxCustomResponse($sContentType)
 {
     $this->sOutput = '';
     $this->sContentType = $sContentType;
     $objResponseManager = xajaxResponseManager::getInstance();
     $this->sCharacterEncoding = $objResponseManager->getCharacterEncoding();
     $this->bOutputEntities = $objResponseManager->getOutputEntities();
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:8,代码来源:xajaxResponse.inc.php

示例4: fire

 function fire($aArgs)
 {
     $objResponseManager = xajaxResponseManager::getInstance();
     foreach (array_keys($this->aHandlers) as $sKey) {
         $this->aHandlers[$sKey]->call($aArgs);
     }
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:7,代码来源:xajaxEvent.inc.php

示例5: __wakeup

 function __wakeup()
 {
     ob_start();
     $sLocalFolder = dirname(__FILE__);
     //SkipAIO
     require $sLocalFolder . '/xajaxPluginManager.inc.php';
     require $sLocalFolder . '/xajaxLanguageManager.inc.php';
     require $sLocalFolder . '/xajaxArgumentManager.inc.php';
     require $sLocalFolder . '/xajaxResponseManager.inc.php';
     require $sLocalFolder . '/xajaxRequest.inc.php';
     require $sLocalFolder . '/xajaxResponse.inc.php';
     //EndSkipAIO
     // this is the list of folders where xajax will look for plugins
     // that will be automatically included at startup.
     $aPluginFolders = array();
     $aPluginFolders[] = dirname($sLocalFolder) . '/xajax_plugins';
     //SkipAIO
     $aPluginFolders[] = $sLocalFolder . '/plugin_layer';
     //EndSkipAIO
     // Setup plugin manager
     $this->objPluginManager =& xajaxPluginManager::getInstance();
     $this->objPluginManager->loadPlugins($aPluginFolders);
     $this->objLanguageManager =& xajaxLanguageManager::getInstance();
     $this->objArgumentManager =& xajaxArgumentManager::getInstance();
     $this->objResponseManager =& xajaxResponseManager::getInstance();
     $this->sCoreIncludeOutput = ob_get_clean();
 }
开发者ID:alex-k,项目名称:velotur,代码行数:27,代码来源:xajax.inc.php

示例6: call

 function call($sMethod, $aArgs)
 {
     $objResponseManager =& xajaxResponseManager::getInstance();
     $objResponseManager->append(call_user_func_array(array(&$this->obj, $sMethod), $aArgs));
 }
开发者ID:joly,项目名称:web2project,代码行数:5,代码来源:xajaxCallableObject.inc.php

示例7: call

 function call($aArgs = array())
 {
     $objResponseManager =& xajaxResponseManager::getInstance();
     if (NULL != $this->sInclude) {
         ob_start();
         require_once $this->sInclude;
         $sOutput = ob_get_clean();
         if (0 < strlen($sOutput)) {
             $sOutput = 'From include file: ' . $this->sInclude . ' => ' . $sOutput;
             $objResponseManager->debug($sOutput);
         }
     }
     $mFunction = $this->uf;
     // where an alias is specified, strip off the alias (first parameter)
     if (is_array($mFunction) && 2 < count($mFunction)) {
         $mFunction = array_slice($mFunction, 1);
     }
     $objResponseManager->append(call_user_func_array($mFunction, $aArgs));
 }
开发者ID:haseok86,项目名称:millkencode,代码行数:19,代码来源:xajaxUserFunction.inc.php

示例8: processRequest

 function processRequest()
 {
     // Check to see if headers have already been sent out, in which case we can't do our job
     if (headers_sent($filename, $linenumber)) {
         echo "Output has already been sent to the browser at {$filename}:{$linenumber}.\n";
         echo 'Please make sure the command $xajax->processRequest() is placed before this.';
         exit;
     }
     if ($this->canProcessRequest()) {
         $objPluginManager =& xajaxPluginManager::getInstance();
         $objResponseManager =& xajaxResponseManager::getInstance();
         // Use xajax error handler if necessary
         if ($this->bErrorHandler) {
             $GLOBALS['xajaxErrorHandlerText'] = "";
             set_error_handler("xajaxErrorHandler");
         }
         $mResult = true;
         // handle beforeProcessing event
         if (isset($this->aProcessingEvents[XAJAX_PROCESSING_EVENT_BEFORE])) {
             $bEndRequest = false;
             $this->aProcessingEvents[XAJAX_PROCESSING_EVENT_BEFORE]->call(array(&$bEndRequest));
             $mResult = false === $bEndRequest;
         }
         if (true === $mResult) {
             $mResult = $objPluginManager->processRequest();
         }
         if (true === $mResult) {
             if ($this->bCleanBuffer) {
                 while (@ob_end_clean()) {
                 }
             }
             // handle afterProcessing event
             if (isset($this->aProcessingEvents[XAJAX_PROCESSING_EVENT_AFTER])) {
                 $bEndRequest = false;
                 $this->aProcessingEvents[XAJAX_PROCESSING_EVENT_AFTER]->call(array(&$bEndRequest));
                 if (true === $bEndRequest) {
                     $objResponseManager =& xajaxResponseManager::getInstance();
                     $objResponseManager->clear();
                     $objResponseManager->append($aResult[1]);
                 }
             }
         } else {
             if (is_string($mResult)) {
                 if ($this->bCleanBuffer) {
                     while (@ob_end_clean()) {
                     }
                 }
                 // $mResult contains an error message
                 // the request was missing the cooresponding handler function
                 // or an error occurred while attempting to execute the
                 // handler.  replace the response, if one has been started
                 // and send a debug message.
                 $objResponseManager->clear();
                 $objResponse =& new xajaxResponse();
                 $objResponseManager->append($objResponse);
                 // handle invalidRequest event
                 if (isset($this->aProcessingEvents[XAJAX_PROCESSING_EVENT_INVALID])) {
                     $this->aProcessingEvents[XAJAX_PROCESSING_EVENT_INVALID]->call();
                 } else {
                     $objResponseManager->debug($mResult);
                 }
             }
         }
         if ($this->bErrorHandler) {
             $sErrorMessage = $GLOBALS['xajaxErrorHandlerText'];
             if (!empty($sErrorMessage)) {
                 if (0 < strlen($this->sLogFile)) {
                     $fH = @fopen($this->sLogFile, "a");
                     if (NULL != $fH) {
                         fwrite($fH, "** xajax Error Log - " . strftime("%b %e %Y %I:%M:%S %p") . " **" . $sErrorMessage . "\n\n\n");
                         fclose($fH);
                     } else {
                         $objResponseManager->debug("** Logging Error **\n\nxajax was unable to write to the error log file:\n" . $this->sLogFile);
                     }
                 }
                 $objResponseManager->debug("** PHP Error Messages: **" . $sErrorMessage);
             }
         }
         $objResponseManager->send();
         if ($this->bErrorHandler) {
             restore_error_handler();
         }
         if ($this->bExitAllowed) {
             exit;
         }
     }
 }
开发者ID:haseok86,项目名称:millkencode,代码行数:87,代码来源:xajax.inc.php


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