Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/unit_config_reader.php
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | |||||
$this->Application->InitManagers(); | $this->Application->InitManagers(); | ||||
// get build-in rewrite listeners ONLY to be able to parse mod-rewrite url when unit config cache is missing | // get build-in rewrite listeners ONLY to be able to parse mod-rewrite url when unit config cache is missing | ||||
$this->retrieveCollections(); | $this->retrieveCollections(); | ||||
$this->_sortRewriteListeners(); | $this->_sortRewriteListeners(); | ||||
} | } | ||||
$this->Application->cacheManager->applyDelayedUnitProcessing(); | $this->Application->cacheManager->applyDelayedUnitProcessing(); | ||||
if ( !$this->Application->InitDone && $cache ) { | |||||
// Allow hooks to modify "m:QueryString" before URL parsing is started during cold start. | |||||
$this->runAfterConfigRead('m'); | |||||
} | |||||
} | } | ||||
function findConfigFiles($folderPath, $level = 0) | function findConfigFiles($folderPath, $level = 0) | ||||
{ | { | ||||
// if FULL_PATH = "/" ensure, that all "/" in $folderPath are not deleted | // if FULL_PATH = "/" ensure, that all "/" in $folderPath are not deleted | ||||
$reg_exp = '/^' . preg_quote(FULL_PATH, '/') . '/'; | $reg_exp = '/^' . preg_quote(FULL_PATH, '/') . '/'; | ||||
$folderPath = preg_replace($reg_exp, '', $folderPath, 1); // this make sense, since $folderPath may NOT contain FULL_PATH | $folderPath = preg_replace($reg_exp, '', $folderPath, 1); // this make sense, since $folderPath may NOT contain FULL_PATH | ||||
▲ Show 20 Lines • Show All 646 Lines • ▼ Show 20 Line(s) | |||||
throw new Exception('Configuration file for prefix "<strong>' . $prefix . '</strong>" is unknown'); | throw new Exception('Configuration file for prefix "<strong>' . $prefix . '</strong>" is unknown'); | ||||
return ; | return ; | ||||
} | } | ||||
$file = $this->prefixFiles[$prefix]; | $file = $this->prefixFiles[$prefix]; | ||||
$prefix = $this->PreloadConfigFile($file); | $prefix = $this->PreloadConfigFile($file); | ||||
if ($this->FinalStage) { | if ( $this->FinalStage || $prefix == 'm' ) { | ||||
// run prefix OnAfterConfigRead so all | // Run prefix OnAfterConfigRead so all hooks to it can define their clones. | ||||
// hooks to it can define their clonses | // Allow hooks to modify "m:QueryString" before URL parsing is started during warm start. | ||||
$this->runAfterConfigRead($prefix); | $this->runAfterConfigRead($prefix); | ||||
} | } | ||||
$clones = $this->postProcessConfig($prefix, 'AggregateConfigs', 'sub_prefix'); | $clones = $this->postProcessConfig($prefix, 'AggregateConfigs', 'sub_prefix'); | ||||
$clones = array_merge($this->postProcessConfig($prefix, 'Clones', 'prefix'), $clones); | $clones = array_merge($this->postProcessConfig($prefix, 'Clones', 'prefix'), $clones); | ||||
if ($this->FinalStage) { | if ($this->FinalStage) { | ||||
$clones = array_unique($clones); | $clones = array_unique($clones); | ||||
▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | |||||
$this->includeConfigFiles(MODULES_PATH); //make sure to re-read all configs | $this->includeConfigFiles(MODULES_PATH); //make sure to re-read all configs | ||||
$this->AfterConfigRead(); | $this->AfterConfigRead(); | ||||
foreach ($this->configData as $prefix => $config_data) { | foreach ($this->configData as $prefix => $config_data) { | ||||
$callback_function[0]->$callback_function[1]($prefix, $config_data, $params); | $callback_function[0]->$callback_function[1]($prefix, $config_data, $params); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file |