本文整理汇总了PHP中osCommerce\OM\Core\OSCOM::loadConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP OSCOM::loadConfig方法的具体用法?PHP OSCOM::loadConfig怎么用?PHP OSCOM::loadConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\OSCOM
的用法示例。
在下文中一共展示了OSCOM::loadConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public static function initialize()
{
OSCOM::loadConfig();
if (strlen(DB_SERVER) < 1) {
osc_redirect(OSCOM::getLink('Setup'));
}
Registry::set('MessageStack', new MessageStack());
Registry::set('Cache', new Cache());
Registry::set('Database', Database::initialize());
$Qcfg = Registry::get('Database')->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
$Qcfg->setCache('configuration');
$Qcfg->execute();
while ($Qcfg->next()) {
define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
}
$Qcfg->freeResult();
Registry::set('Session', Session::load('adminSid'));
Registry::get('Session')->start();
Registry::get('MessageStack')->loadFromSession();
Registry::set('Language', new Language());
if (!self::hasAccess(OSCOM::getSiteApplication())) {
Registry::get('MessageStack')->add('header', 'No access.', 'error');
osc_redirect_admin(OSCOM::getLink(null, 'Index'));
}
$application = 'osCommerce\\OM\\Core\\Site\\Admin\\Application\\' . OSCOM::getSiteApplication() . '\\Controller';
Registry::set('Application', new $application());
Registry::set('Template', new Template());
Registry::get('Template')->setApplication(Registry::get('Application'));
// HPDL move following checks elsewhere
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_error_no_default_currency'), 'error');
}
// check if a default language is set
if (!defined('DEFAULT_LANGUAGE')) {
Registry::get('MessageStack')->add('header', ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
}
if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_warning_uploads_disabled'), 'warning');
}
}