147 $this->timer->begin([]);
149 if (!$config->dataroot && !$config->installer_running) {
153 if (!$config->cacheroot) {
154 $config->cacheroot = $config->dataroot .
'caches';
157 if (!$config->assetroot) {
158 $config->assetroot = $config->cacheroot .
'views_simplecache';
161 if (!$config->wwwroot) {
162 $config->wwwroot = $this->request->sniffElggUrl();
165 if (!$config->plugins_path) {
170 $config->pluginspath = $config->plugins_path;
171 $config->url = $config->wwwroot;
175 $secret = \Elgg\Database\SiteSecret::fromConfig($config);
177 $this->
set(
'siteSecret', $secret);
179 $this->
set(
'siteSecret',
function(ContainerInterface $c) {
180 return \Elgg\Database\SiteSecret::fromDatabase($c->configTable);
185 foreach ($config::SENSITIVE_PROPERTIES as
$name) {
186 unset($config->{$name});
201 return $c->initConfig(
$config);
static project()
Get the project root (where composer is installed) path with "/".
A generic parent class for Configuration exceptions.
static elgg()
Get the Elgg codebase path with "/".
static fromElggConfig(Config $config)
Construct from an Elgg Config.
if(!$user||!$user->canDelete()) $name
static factory(array $options=[])
$config
Advanced site settings, debugging section.
initConfig(Config $config)
Validate, normalize, fill in missing values, and lock some.
static getDefinitionSources()