Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/kernel/utility/unit_config_reader.php
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Line(s) | |||||
$this->cloner->extrudeAndParse($prefixes); | $this->cloner->extrudeAndParse($prefixes); | ||||
} | } | ||||
/** | /** | ||||
* Returns unit configs prefixes without priority defined. | * Returns unit configs prefixes without priority defined. | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
protected function getUnitConfigsWithoutPriority() | public function getUnitConfigsWithoutPriority() | ||||
{ | { | ||||
$ret = array(); | $ret = array(); | ||||
foreach ( $this->configData as $prefix => $config ) { | foreach ( $this->configData as $prefix => $config ) { | ||||
if ( $config->getConfigPriority() === false ) { | if ( $config->getConfigPriority() === false ) { | ||||
$ret[] = $prefix; | $ret[] = $prefix; | ||||
} | } | ||||
} | } | ||||
return $ret; | return $ret; | ||||
} | } | ||||
/** | /** | ||||
* Returns unit configs prefixes with priority defined. | * Returns unit configs prefixes with priority defined. | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
protected function getUnitConfigsWithPriority() | public function getUnitConfigsWithPriority() | ||||
{ | { | ||||
$ret = array(); | $ret = array(); | ||||
foreach ( $this->configData as $prefix => $config ) { | foreach ( $this->configData as $prefix => $config ) { | ||||
$priority = $config->getConfigPriority(); | $priority = $config->getConfigPriority(); | ||||
if ( $priority !== false ) { | if ( $priority !== false ) { | ||||
$ret[$prefix] = $priority; | $ret[$prefix] = $priority; | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | |||||
/** | /** | ||||
* Re-reads all configs. | * Re-reads all configs. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function ReReadConfigs() | public function ReReadConfigs() | ||||
{ | { | ||||
if ( $this->storeCache && $this->finalStage ) { | |||||
// Building cache right now, so all unit configs are read anyway. | |||||
return; | |||||
} | |||||
// don't reset prefix file, since file scanning could slow down the process | // don't reset prefix file, since file scanning could slow down the process | ||||
$prefix_files_backup = $this->prefixFiles; | $prefix_files_backup = $this->prefixFiles; | ||||
$this->Application->cacheManager->EmptyUnitCache(); | $this->Application->cacheManager->EmptyUnitCache(); | ||||
$this->prefixFiles = $prefix_files_backup; | $this->prefixFiles = $prefix_files_backup; | ||||
// parse all configs | // parse all configs | ||||
$this->afterConfigProcessed = array(); | $this->afterConfigProcessed = array(); | ||||
$this->includeConfigFiles(MODULES_PATH, false); | $this->includeConfigFiles(MODULES_PATH, false); | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |