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


PHP ModuleHandler::procModule方法代码示例

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


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

示例1: procRealModule

 /**
  * Get content of real module
  *
  * @param string $module module name
  * @param string $mid module id
  * @param string $skin skin name
  * @param string $skinType PC(P) or mobile(M)
  * @return string content of real module
  */
 private function procRealModule($module, $mid, $skin, $skinType)
 {
     // if form site design and preview module, find target module
     if ($module && !$mid) {
         $args = new stdClass();
         $args->module = $module;
         $output = executeQuery('layout.getOneModuleInstanceByModuleName', $args);
         if (!$output->toBool()) {
             throw new Exception($output->getMessage());
         }
         // if there is no module instance, error...
         if (!$output->data) {
             throw new Exception(Context::getLang('msg_unabled_preview'));
         }
         $mid = current($output->data)->mid;
     } elseif (!$module && !$mid) {
         $oModuleModel = getModel('module');
         $columnList = array('modules.mid', 'sites.index_module_srl');
         $startModuleInfo = $oModuleModel->getSiteInfo(0, $columnList);
         $mid = $startModuleInfo->mid;
     }
     $oModuleHandler = new ModuleHandler('', '', $mid, '', '');
     // Adhoc...
     $oModuleHandler->act = '';
     $oModuleHandler->init();
     // Adhoc...
     $oModuleHandler->module_info->use_mobile = 'Y';
     $oModuleHandler->module_info->is_skin_fix = 'Y';
     $oModuleHandler->module_info->is_mskin_fix = 'Y';
     if ($skinType == 'M') {
         Mobile::setMobile(TRUE);
         $oModuleHandler->module_info->mskin = $skin;
     } else {
         Mobile::setMobile(FALSE);
         $oModuleHandler->module_info->skin = $skin;
     }
     // Proc module
     $oModule = $oModuleHandler->procModule();
     if (!$oModule->toBool()) {
         throw new Exception(Context::getLang('not_support_layout_preview'));
     }
     // get module html
     require_once _XE_PATH_ . "classes/display/HTMLDisplayHandler.php";
     $handler = new HTMLDisplayHandler();
     return $handler->toDoc($oModule);
 }
开发者ID:rubythonode,项目名称:xe-core,代码行数:55,代码来源:layout.view.php

示例2: dirname

 * @brief Declare constants for generic use and for checking to avoid a direct call from the Web
 **/
define('__XE__', TRUE);
/**
 * @brief Include the necessary configuration files
 **/
require dirname(__FILE__) . '/config/config.inc.php';
/**
 * @brief Initialize by creating Context object
 * Set all Request Argument/Environment variables
 **/
$oContext = Context::getInstance();
$oContext->init();
/**
 * @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
 **/
if ($oContext->checkSSO()) {
    $oModuleHandler = new ModuleHandler();
    try {
        if ($oModuleHandler->init()) {
            $oModuleHandler->displayContent($oModuleHandler->procModule());
        }
    } catch (Exception $e) {
        htmlHeader();
        echo Context::getLang($e->getMessage());
        htmlFooter();
    }
}
$oContext->close();
/* End of file index.php */
/* Location: ./index.php */
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:index.php

示例3: dirname

 *
 **/
/**
 * @brief Declare constants for generic use and for checking to avoid a direct call from the Web
 **/
define('__XE__', TRUE);
define('__ZBXE__', TRUE);
// deprecated : __ZBXE__ will be removed. Use __XE__ instead.
/**
 * @brief Include the necessary configuration files
 **/
require dirname(__FILE__) . '/config/config.inc.php';
/**
 * @brief Initialize by creating Context object
 * Set all Request Argument/Environment variables
 **/
$oContext =& Context::getInstance();
$oContext->init();
/**
 * @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
 **/
if ($oContext->checkSSO()) {
    $oModuleHandler = new ModuleHandler();
    if ($oModuleHandler->init()) {
        $oModule =& $oModuleHandler->procModule();
        $oModuleHandler->displayContent($oModule);
    }
}
$oContext->close();
/* End of file index.php */
/* Location: ./index.php */
开发者ID:relip,项目名称:xe-core,代码行数:31,代码来源:index.php


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