Issue Bug Rejected

#56317Cache Local and Default Configuration to prevent duplicate File Access

Steffen Ritter 02/26/14, 12:59 updated 10/06/15, 21:37

Description

See configurationManager

/**
 * @var array
*/
protected static $defaultConfiguration = NULL;
/**
 * @var array
*/
protected static $localConfiguration = NULL;
/**
 * @var string Absolute path to typo3conf directory
*/
protected $pathTypo3Conf = PATH_typo3conf;
/**
 * Writing to these configuration pathes is always allowed,
 * even if the requested sub path does not exist yet.
 *
 * @var array
*/
protected $whiteListedLocalConfigurationPaths = array(
‘EXT/extConf’,
‘EXTCONF’,
‘INSTALL/wizardDone’,
‘DB’,
‘SYS/caching/cacheConfigurations’,
);
/**
 * Return default configuration array
 *
 * @return array
*/
public function getDefaultConfiguration() {
if (static::$defaultConfiguration === NULL) {
static::$defaultConfiguration = require_once $this->getDefaultConfigurationFileLocation();
}
return static::$defaultConfiguration;
}
/**
 * Get the file location of the default configuration file,
 * currently the path and filename.
 *
 * return string
 * access private
*/
public function getDefaultConfigurationFileLocation() {
return PATH_site . $this->defaultConfigurationFile;
}
/**
 * Return local configuration array typo3conf/LocalConfiguration.php
 *
 * @return array Content array of local configuration file
*/
public function getLocalConfiguration() {
if (static::$localConfiguration === NULL) {
static::$localConfiguration = require_once $this->getLocalConfigurationFileLocation();
}
return static::$localConfiguration;
}

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.