42 if ( !str_ends_with(
$file,
'.php' ) ) {
43 $this->settingsBuilder->loadFile(
$file );
48 $config = $this->settingsBuilder->getConfig();
49 foreach ( $this->settingsBuilder->getDefinedConfigKeys() as $key ) {
51 $$var = $config->get( $key );
64 $file = SettingsFileUtils::resolveRelativeLocation(
$file, $this->baseDir );
65 $settings = require
$file;
69 foreach ( get_defined_vars() as $name => $value ) {
70 if ( str_starts_with( $name,
'wg' ) ) {
71 $key = substr( $name, 2 );
72 $overrides[$key] = $value;
76 $this->settingsBuilder->overrideConfigValues( $overrides );
80 if ( is_array( $settings ) ) {
81 $this->settingsBuilder->loadArray( $settings );