本文整理匯總了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;
}