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


PHP Website::getWebsiteConfig方法代码示例

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


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

示例1: __construct

 public function __construct($type, $limit = 5, $page = 0, $worldId = 0, $vocation = '')
 {
     $this->highscoreConfig = Website::getWebsiteConfig();
     parent::__construct();
     $this->skillType = $type;
     $this->setLimit($limit);
     $this->setOffset($page * $limit);
     $this->worldId = $worldId;
     $this->vocation = $vocation;
     switch ($type) {
         case self::SKILL_FIST:
         case self::SKILL_CLUB:
         case self::SKILL_SWORD:
         case self::SKILL_AXE:
         case self::SKILL_DISTANCE:
         case self::SKILL_SHIELD:
         case self::SKILL_FISHING:
             $this->loadSkill();
             break;
         case self::SKILL__MAGLEVEL:
             $this->loadMagic();
             break;
         case self::SKILL__LEVEL:
             $this->loadLevel();
             break;
         default:
             new Error_Critic('', __METHOD__ . '(), unknown type: ' . htmlspecialchars($type));
             break;
     }
 }
开发者ID:Pietia10,项目名称:Gesior-for-OTServ,代码行数:30,代码来源:highscores.php

示例2: ConfigLUA

         $tmp_php_config->setConfig($tmp_lua_config->getConfig());
         $tmp_php_config->saveToFile('./config/server.config.php');
     }
 } else {
     $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
     $config['server'] = $tmp_lua_config->getConfig();
 }
 if (Website::getServerConfig()->isSetKey('mysqlHost')) {
     define('SERVERCONFIG_SQL_HOST', 'mysqlHost');
     define('SERVERCONFIG_SQL_PORT', 'mysqlPort');
     define('SERVERCONFIG_SQL_USER', 'mysqlUser');
     define('SERVERCONFIG_SQL_PASS', 'mysqlPass');
     define('SERVERCONFIG_SQL_DATABASE', 'mysqlDatabase');
     define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
 } else {
     new Error_Critic('#E-3', 'There is no key <b>mysqlHost</b> in server config', array(new Error('INFO', 'use server config cache: <b>' . (Website::getWebsiteConfig()->getValue('useServerConfigCache') ? 'true' : 'false') . '</b>')));
 }
 Website::setDatabaseDriver(Database::DB_MYSQL);
 if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST)) {
     Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
 } else {
     new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
 }
 if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PORT)) {
     Website::getDBHandle()->setDatabasePort(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PORT));
 } else {
     new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PORT . '</b> in server config file.');
 }
 if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE)) {
     Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
 } else {
开发者ID:s3kk,项目名称:Gesior1.x,代码行数:31,代码来源:install.php

示例3: Account

}
$logged = false;
$account_logged = new Account();
$group_id_of_acc_logged = 0;
// with ONLY_PAGE option we want disable useless SQL queries
if (!ONLY_PAGE) {
    // logged boolean value: true/false
    $logged = Visitor::isLogged();
    // Account object with account of logged player or empty Account
    $account_logged = Visitor::getAccount();
    // group of acc. logged
    if (Visitor::isLogged()) {
        $group_id_of_acc_logged = Visitor::getAccount()->getPageAccess();
    }
}
$layout_name = './layouts/' . Website::getWebsiteConfig()->getValue('layout');
$title = ucwords($subtopic) . ' - ' . Website::getServerConfig()->getValue('servername');
$topic = $subtopic;
$passwordency = Website::getServerConfig()->getValue('passwordtype');
if ($passwordency == 'plain') {
    $passwordency = '';
}
$news_content = '';
$layout_ini = parse_ini_file($layout_name . '/layout_config.ini');
foreach ($layout_ini as $key => $value) {
    $config['site'][$key] = $value;
}
//###################### FUNCTIONS ######################
function microtime_float()
{
    return microtime(true);
开发者ID:Pietia10,项目名称:Gesior-for-OTServ,代码行数:31,代码来源:load.compat.php

示例4: ConfigPHP

//load server config $config['server']
if (Website::getWebsiteConfig()->getValue('useServerConfigCache')) {
    // use cache to make website load faster
    if (Website::fileExists('./config/server.config.php')) {
        $tmp_php_config = new ConfigPHP('./config/server.config.php');
        $config['server'] = $tmp_php_config->getConfig();
    } else {
        // if file isn't cached we should load .lua file and make .php cache
        $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
        $config['server'] = $tmp_lua_config->getConfig();
        $tmp_php_config = new ConfigPHP();
        $tmp_php_config->setConfig($tmp_lua_config->getConfig());
        $tmp_php_config->saveToFile('./config/server.config.php');
    }
} else {
    $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
    $config['server'] = $tmp_lua_config->getConfig();
}
// remove magic quotes, to make it compatible with some bad PHP configurations, 'stripslashes' in scripts is not needed anymore!
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    while (list($key, $val) = each($process)) {
        foreach ($val as $k => $v) {
            unset($process[$key][$k]);
            if (is_array($v)) {
                $process[$key][stripslashes($k)] = $v;
                $process[] =& $process[$key][stripslashes($k)];
            } else {
                $process[$key][stripslashes($k)] = stripslashes($v);
            }
        }
开发者ID:totolol123,项目名称:TFS-Flash,代码行数:31,代码来源:load.init.php


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