*/
private static $selfInstance = NULL;
+ /**
+ * Cached configuration entry 'developer_mode_enabled'
+ */
+ private static $developerModeEnabled = false;
+
/**
* Array with all valid but pending for loading file names (class,
* interfaces, traits must start with below prefix).
* @return void
*/
private function __construct () {
- // This is empty for now
+ // Cache config entry
+ self::$developerModeEnabled = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('developer_mode_enabled');
}
/**
*/
public function __destruct () {
// Skip here if dev-mode
- if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('developer_mode_enabled')) {
+ if (self::$developerModeEnabled) {
return;
}
*/
private function initClassLoader () {
// Construct the FQFN for the cache
- if (!FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('developer_mode_enabled')) {
+ if (!self::$developerModeEnabled) {
// Init cache instances
$this->listCacheFile = new SplFileInfo(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . 'list-' . FrameworkBootstrap::getDetectedApplicationName() . '.cache');
$this->classCacheFile = new SplFileInfo(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . 'class-' . FrameworkBootstrap::getDetectedApplicationName() . '.cache');
self::$selfInstance = $this;
// Skip here if no dev-mode
- if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('developer_mode_enabled')) {
+ if (self::$developerModeEnabled) {
return;
}
unset($this->pendingFiles[$fileName]);
// Developer mode excludes caching (better debugging)
- if (!FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('developer_mode_enabled')) {
+ if (!self::$developerModeEnabled) {
// Reset cache
//* NOISY-DEBUG: */ printf('[%s:%d] classesCached=false' . PHP_EOL, __METHOD__, __LINE__);
$this->classesCached = false;