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


PHP UserConfig::getConfig方法代码示例

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


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

示例1: createUdpApplication

 public static function createUdpApplication($config)
 {
     AutoLoad::addRoot(dirname(dirname($config)));
     SysLog::init(UserConfig::getConfig('log'));
     return new YaafUdpServ();
     // return $class;
     //进行路由解析等
 }
开发者ID:delphinBlue,项目名称:tsf,代码行数:8,代码来源:tsf.php

示例2: _getIncludes

 protected function _getIncludes()
 {
     $config = array();
     $config['js']['core'] = json_decode($this->getModule('FS')->read(self::INCLUDES_PATH), TRUE);
     $core_css = $this->getModule('FS')->readDir("system/ui/core/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
     if ($this->isSession()) {
         $user_config = new UserConfig();
         $ui = $user_config->getConfig('ui', TRUE);
         foreach (array('interface', 'icons') as $value) {
             $this->set_session_value($value, $ui[$value]);
         }
         $user_css = $this->getModule('FS')->readDir("system/ui/" . $this->session['interface'] . "/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
         $user_js = [];
         //$this->getModule('FS')->readDir("system/ui/".$this->session['interface']."/interface", TRUE, array('file_type' => 'js', 'path_type' => FS::FILESYSTEM_PATH));
     } else {
         $user_css = $this->getModule('FS')->readDir("system/ui/flatos/interface", TRUE, array('file_type' => 'css', 'path_type' => FS::FILESYSTEM_PATH));
         $user_js = $this->getModule('FS')->readDir("system/ui/flatos/interface", TRUE, array('file_type' => 'js', 'path_type' => FS::FILESYSTEM_PATH));
     }
     $config['css']['core'] = $core_css;
     $config['css']['user'] = $user_css;
     $config['js']['user'] = $user_js;
     return $config;
 }
开发者ID:na2axl,项目名称:FlatOS,代码行数:23,代码来源:UserInterface.php

示例3: configNew

# Uncomment the following line  if you  like to count the hits, then make sure
# that the path /counter/hits/ and the file /counter/hitcount.txt  are system writeable
#
// include('./counter/count.php');
if (isset($boot) && $boot || !isset($HTTP_COOKIE_VARS['ck_config']) || empty($HTTP_COOKIE_VARS['ck_config'])) {
    configNew($bname, $bversion, $user_id, $ip, $cfgid);
} else {
    $user_id = $HTTP_COOKIE_VARS['ck_config'];
}
#
# Load user config API. Get the user config data from db
#
require_once 'include/care_api_classes/class_userconfig.php';
$cfg_obj = new UserConfig();
if ($cfg_obj->exists($user_id)) {
    $cfg_obj->getConfig($user_id);
    $USERCONFIG = $cfg_obj->buffer;
    $config_exists = true;
    // Flag that user config is existing
} else {
    $cfg_obj->_getDefault();
    $USERCONFIG = $cfg_obj->buffer;
}
# Load global configurations API
require_once 'include/care_api_classes/class_globalconfig.php';
$glob_cfg = new GlobalConfig($GLOBALCONFIG);
# Get the global config for language usage
$glob_cfg->getConfig('language_%');
# Get the global config for frames
$glob_cfg->getConfig('gui_frame_left_nav_width');
# Get the global config for lev nav border
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:31,代码来源:index.php

示例4: array

*
* See the file "copy_notice.txt" for the licence notice
*/
$lang_tables = array('stdpass.php');
define('LANG_FILE', 'specials.php');
//$local_user='ck_edv_user';
define('NO_2LEVEL_CHK', 1);
require_once $root_path . 'include/inc_front_chain_lang.php';
$breakfile = 'config_options.php' . URL_APPEND;
$thisfile = basename($_SERVER['PHP_SELF']);
if (isset($mode) && $mode == 'save') {
    // Save to user config table
    $config_new['template_smarty'] = $template_smarty;
    include_once $root_path . 'include/care_api_classes/class_userconfig.php';
    $user = new UserConfig();
    if ($user->getConfig($_COOKIE['ck_config'])) {
        $config =& $user->getConfigData();
        $config = array_merge($config, $config_new);
        if ($user->saveConfig($_COOKIE['ck_config'], $config)) {
            header('location:' . basename(__FILE__) . URL_REDIRECT_APPEND . '&saved=1');
            exit;
        }
    }
} elseif (!isset($cfg['template_smarty']) || empty($cfg['template_smarty'])) {
    if (!isset($GLOBAL_CONFIG)) {
        $GLOBAL_CONFIG = array();
    }
    include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
    $gc = new GlobalConfig($GLOBAL_CONFIG);
    $gc->getConfig('template_smarty');
    if (!empty($GLOBAL_CONFIG['template_smarty'])) {
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:config_options_smarty.php

示例5: UserConfig

<?php

# Get the  config depending on the current logged user id
require_once $root_path . 'include/care_api_classes/class_config.php';
$userobj = new UserConfig();
$globobj = new GlobalConfig($GLOBALCONFIG);
$USERCONFIG =& $userobj->getConfig($user_id);
$globobj->getConfig('news_%');
while (list($x, $v) = each($GLOBALCONFIG)) {
    ${$x} = $USERCONFIG[$x] ? $USERCONFIG[$x] : $GLOBALCONFIG[$x];
}
if (!$news_normal_preview_maxlen) {
    $news_normal_preview_maxlen = 300;
}
# Load editor functions
require_once $root_path . 'include/inc_editor_fx.php';
require_once $root_path . 'include/inc_date_format_functions.php';
?>

开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:18,代码来源:inc_news_display_config.php

示例6: __construct

 protected function __construct()
 {
     $config = \UserConfig::getConfig("db");
     if (empty($config['host']) || empty($config['database']) || empty($config['user'])) {
         echo "require host, database, user, password config";
         //throw new \Exception("require host, database, user, password config.");
     }
     if (!function_exists('swoole_get_mysqli_sock')) {
         echo "require swoole_get_mysqli_sock function.";
         //throw new \Exception("require swoole_get_mysqli_sock function.");
     }
     if (empty($config['port'])) {
         $config['port'] = 3306;
     }
     $this->config = $config;
     $this->pool_size = $config['pool'];
 }
开发者ID:sukui,项目名称:tsf,代码行数:17,代码来源:DB.php


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