mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-11 17:32:41 +01:00
da9315b145
Summary: Because the Default configuration provider is loaded before custom libraries, any config options specified in them don't get a default values. Test Plan: Looked at /config/ Reviewers: epriestley, codeblock, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4532
22 lines
634 B
PHP
22 lines
634 B
PHP
<?php
|
|
|
|
/**
|
|
* Configuration source which reads from defaults defined in the authoritative
|
|
* configuration definitions.
|
|
*/
|
|
final class PhabricatorConfigDefaultSource
|
|
extends PhabricatorConfigProxySource {
|
|
|
|
public function __construct() {
|
|
$options = PhabricatorApplicationConfigOptions::loadAllOptions();
|
|
$options = mpull($options, 'getDefault');
|
|
$this->setSource(new PhabricatorConfigDictionarySource($options));
|
|
}
|
|
|
|
public function loadExternalOptions() {
|
|
$options = PhabricatorApplicationConfigOptions::loadAllOptions(true);
|
|
$options = mpull($options, 'getDefault');
|
|
$this->setKeys($options);
|
|
}
|
|
|
|
}
|