本文整理匯總了PHP中oxRegistry::getKeys方法的典型用法代碼示例。如果您正苦於以下問題:PHP oxRegistry::getKeys方法的具體用法?PHP oxRegistry::getKeys怎麽用?PHP oxRegistry::getKeys使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類oxRegistry
的用法示例。
在下文中一共展示了oxRegistry::getKeys方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _resetRegistry
/**
* Cleans up the registry before/after the test execution
*
* @return null;
*/
protected function _resetRegistry()
{
$aRegKeys = oxRegistry::getKeys();
$aSkippedClasses = array("oxconfigfile");
foreach ($aRegKeys as $sKey) {
if (!in_array($sKey, $aSkippedClasses)) {
oxRegistry::set($sKey, null);
}
}
}
示例2: _resetRegistry
/**
* Cleans up the registry
*
* @return null;
*/
protected function _resetRegistry()
{
$aRegKeys = oxRegistry::getKeys();
$aSkippedClasses = array("oxconfigfile");
foreach ($aRegKeys as $sKey) {
if (!in_array($sKey, $aSkippedClasses)) {
$oInstance = null;
if (!isset(self::$_aRegistryCache[$sKey])) {
try {
$oNewInstance = oxNew($sKey);
self::$_aRegistryCache[$sKey] = $oNewInstance;
} catch (oxSystemComponentException $oException) {
oxRegistry::set($sKey, null);
continue;
}
}
$oInstance = clone self::$_aRegistryCache[$sKey];
oxRegistry::set($sKey, $oInstance);
}
}
}