Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/env/PhabricatorConfigFileSource.php
12241 views
1
<?php
2
3
/**
4
* Configuration source which reads from a configuration file on disk (a
5
* PHP file in the `conf/` directory).
6
*/
7
final class PhabricatorConfigFileSource extends PhabricatorConfigProxySource {
8
9
/**
10
* @phutil-external-symbol function phabricator_read_config_file
11
*/
12
public function __construct($config) {
13
$root = dirname(phutil_get_library_root('phabricator'));
14
require_once $root.'/conf/__init_conf__.php';
15
16
$dictionary = phabricator_read_config_file($config);
17
$dictionary['phabricator.env'] = $config;
18
19
$this->setSource(new PhabricatorConfigDictionarySource($dictionary));
20
}
21
22
}
23
24