本文整理汇总了PHP中SugarTestHelper::isInited方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarTestHelper::isInited方法的具体用法?PHP SugarTestHelper::isInited怎么用?PHP SugarTestHelper::isInited使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarTestHelper
的用法示例。
在下文中一共展示了SugarTestHelper::isInited方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialization of main variables of SugarCRM in global scope
*
* @static
*/
public static function init()
{
if (self::$isInited == true) {
return true;
}
// initialization & backup of sugar_config
self::$initVars['GLOBALS']['sugar_config'] = null;
if ($GLOBALS['sugar_config']) {
self::$initVars['GLOBALS']['sugar_config'] = $GLOBALS['sugar_config'];
}
if (self::$initVars['GLOBALS']['sugar_config'] == false) {
global $sugar_config;
if (is_file('config.php')) {
require_once 'config.php';
}
if (is_file('config_override.php')) {
require_once 'config_override.php';
}
self::$initVars['GLOBALS']['sugar_config'] = $GLOBALS['sugar_config'];
}
// backup of current_language
self::$initVars['GLOBALS']['current_language'] = 'en_us';
if (isset($sugar_config['current_language'])) {
self::$initVars['GLOBALS']['current_language'] = $sugar_config['current_language'];
}
if (isset($GLOBALS['current_language'])) {
self::$initVars['GLOBALS']['current_language'] = $GLOBALS['current_language'];
}
$GLOBALS['current_language'] = self::$initVars['GLOBALS']['current_language'];
// backup of reload_vardefs
self::$initVars['GLOBALS']['reload_vardefs'] = null;
if (isset($GLOBALS['reload_vardefs'])) {
self::$initVars['GLOBALS']['reload_vardefs'] = $GLOBALS['reload_vardefs'];
}
// backup of locale
self::$initVars['GLOBALS']['locale'] = null;
if (isset($GLOBALS['locale'])) {
self::$initVars['GLOBALS']['locale'] = $GLOBALS['locale'];
}
if (self::$initVars['GLOBALS']['locale'] == false) {
self::$initVars['GLOBALS']['locale'] = new Localization();
}
// backup of service_object
self::$initVars['GLOBALS']['service_object'] = null;
if (isset($GLOBALS['service_object'])) {
self::$initVars['GLOBALS']['service_object'] = $GLOBALS['service_object'];
}
// backup of SugarThemeRegistry
self::$systemVars['SugarThemeRegistry'] = SugarThemeRegistry::current();
self::$isInited = true;
}