本文整理汇总了PHP中eZINI::resetAllGlobals方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::resetAllGlobals方法的具体用法?PHP eZINI::resetAllGlobals怎么用?PHP eZINI::resetAllGlobals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZINI
的用法示例。
在下文中一共展示了eZINI::resetAllGlobals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* Reloads extensions and changes siteaccess globally
* If you only want changes on a instance of ini, use {@link eZSiteAccess::getIni()}
*
* - clears all in-memory caches used by the INI system
* - re-builds the list of paths where INI files are searched for
* - runs {@link eZSiteAccess::change()}
* - re-searches module paths {@link eZModule::setGlobalPathList()}
*
* @since 4.4
* @param array $access An associative array with 'name' (string), 'type' (int) and 'uri_part' (array).
* See {@link eZSiteAccess::match()} for array structure definition
* @param eZINI|null $siteINI Optional parameter to be able to only do change on specific instance of site.ini
* If set, then global siteacceess will not be changed as well.
* @return array The $access parameter
*/
static function load(array $access, eZINI $siteINI = null)
{
$currentSiteAccess = $GLOBALS['eZCurrentAccess'];
unset($GLOBALS['eZCurrentAccess']);
// Clear all ini override dirs
if ($siteINI instanceof eZINI) {
$siteINI->resetOverrideDirs();
} else {
eZINI::resetAllGlobals();
eZExtension::clearActiveExtensionsMemoryCache();
eZTemplateDesignResource::clearInMemoryCache();
}
// Reload extensions, siteaccess and access extensions
eZExtension::activateExtensions('default', $siteINI);
$access = self::change($access, $siteINI);
eZExtension::activateExtensions('access', $siteINI);
// Restore current (old) siteacces if changes where only to be applied to locale instance of site.ini
if ($siteINI instanceof eZINI) {
$GLOBALS['eZCurrentAccess'] = $currentSiteAccess;
} else {
$moduleRepositories = eZModule::activeModuleRepositories();
eZModule::setGlobalPathList($moduleRepositories);
}
return $access;
}