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


PHP cmsFramework::init方法代码示例

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


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

示例1: __construct

 function __construct($app)
 {
     global $Itemid, $mosConfig_sef, $mosConfig_lang;
     cmsFramework::init($this);
     if (isset($this->xajax) && $this->xajax == true) {
         $this->loadXajax();
     }
     /****************** THIS BLOCK CAN PROBABLY BE DELETED ******************/
     $this->language = $mosConfig_lang;
     $this->itemid = $Itemid;
     $this->sef = $mosConfig_sef;
     /****************** THIS BLOCK CAN PROBABLY BE DELETED ******************/
     # Get ip address
     $this->ipaddress = s2GetIpAddress();
     $this->app = $app;
     # Load models
     $this->__initModels();
     parent::__construct();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:19,代码来源:controller.php

示例2: define

}
if ((string) @$_GET['option'] != 'com_content' && (string) @$_GET['option'] != 'com_frontpage' && (string) @$_GET['option'] != '') {
    return;
}
# MVC initalization script
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
if (defined('JPATH_SITE')) {
    $root = JPATH_SITE . DS;
} else {
    global $mainframe;
    $root = $mainframe->getCfg('absolute_path') . DS;
}
require $root . 'components' . DS . 'com_jreviews' . DS . 'jreviews' . DS . 'framework.php';
cmsFramework::init($CMS);
$option = Sanitize::getString($_REQUEST, 'option', '');
$task = Sanitize::getString($_REQUEST, 'task', '');
$view = Sanitize::getString($_REQUEST, 'view', '');
$layout = Sanitize::getString($_REQUEST, 'layout', '');
$id = explode(':', Sanitize::getInt($_REQUEST, 'id'));
$id = $id[0];
# Plugins table
if (!defined('_PLUGIN_DIR_NAME')) {
    if (getCmsVersion() == CMS_JOOMLA15) {
        define('_PLUGIN_DIR_NAME', 'plugins');
    } else {
        define('_PLUGIN_DIR_NAME', 'mambots');
    }
}
$query = "SELECT published,params FROM #__" . _PLUGIN_DIR_NAME . " WHERE element = 'jreviews' AND folder = 'content' LIMIT 1";
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:jreviews.php

示例3: elseif

    $act = Sanitize::getString($_REQUEST, 'act');
    if ($act == 'license') {
        $_GET['url'] = 'license';
    } else {
        $_GET['url'] = Sanitize::getString($_GET, 'url', 'about');
    }
    /*******************************************************************
     *                         FRONT-END ROUTING
     ******************************************************************/
} elseif ($menu_id && !$xajax && !isset($_POST['data']['controller']) && (!$url || !isset($route['data']['controller']) || preg_match('/^menu\\//', $route['url']['url']))) {
    // If no task is passed in the url, then this is a menu item and we read the menu parameters
    $segments = array();
    $url_param = $url;
    $url = str_replace('menu', '', $url);
    $cms = new stdClass();
    cmsFramework::init($cms);
    $query = "SELECT * FROM #__menu WHERE id = " . $menu_id;
    $cms->_db->setQuery($query);
    $menu = end($cms->_db->loadObjectList());
    $mparams = getCmsVersion() == CMS_JOOMLA16 ? json_decode($menu->params, true) : stringToArray($menu->params);
    if (isset($mparams['action'])) {
        $action = paramsRoute((int) $mparams['action']);
        $_REQUEST['Itemid'] = $_GET['Itemid'] = $menu->id;
        // For default - home page menu
        unset($mparams['action']);
        $menu_params['data'] = $mparams;
        $menu_params['dir'] = $mparams['dirid'];
        $menu_params['section'] = $mparams['sectionid'];
        $menu_params['cat'] = $mparams['catid'];
        $menu_params['criteria'] = $mparams['criteriaid'];
        //        $menu_params['url'] = 'menu';
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:index.php

示例4: __construct

 function __construct()
 {
     # Adds CMS DB and Mainframe methods
     cmsFramework::init($this);
     parent::__construct();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:6,代码来源:model.php


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