$this->getMode()->determine($this->basePath);
if ($this->getMode()->has(App\Mode::DBAVAILABLE)) {
- Core\Hook::loadHooks();
$loader = new ConfigCacheLoader($this->basePath);
- Core\Hook::callAll('load_config', $loader);
$this->config->getCache()->load($loader->loadCoreConfig('addon'), true);
+
+ $this->profiler->update(
+ $this->config->get('system', 'profiler', false),
+ $this->config->get('rendertime', 'callstack', false));
+
+ Core\Hook::loadHooks();
+ Core\Hook::callAll('load_config', $loader);
}
$this->loadDefaultTimezone();
return $this->rendertime;
}
+ /**
+ * Updates the enabling of the current profiler
+ *
+ * @param bool $enabled
+ * @param bool $renderTime
+ */
+ public function update($enabled = false, $renderTime = false)
+ {
+ $this->enabled = $enabled;
+ $this->rendertime = $renderTime;
+ }
+
/**
* @param bool $enabled True, if the Profiler is enabled
* @param bool $renderTime True, if the Profiler should measure the whole rendertime including functions