2013-01-01 23:10:33 +01:00
|
|
|
<?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));
|
|
|
|
}
|
|
|
|
|
2013-01-19 17:34:54 +01:00
|
|
|
public function loadExternalOptions() {
|
|
|
|
$options = PhabricatorApplicationConfigOptions::loadAllOptions(true);
|
|
|
|
$options = mpull($options, 'getDefault');
|
|
|
|
$this->setKeys($options);
|
|
|
|
}
|
|
|
|
|
2013-01-01 23:10:33 +01:00
|
|
|
}
|