Phan\CLI::maybeReadConfigFile PHP 메소드

maybeReadConfigFile() 개인적인 메소드

Look for a .phan/config file up to a few directories up the hierarchy and apply anything in there to the configuration.
private maybeReadConfigFile ( )
    private function maybeReadConfigFile()
    {
        // If the file doesn't exist here, try a directory up
        $config_file_name = !empty($this->config_file) ? realpath($this->config_file) : implode(DIRECTORY_SEPARATOR, [Config::get()->getProjectRootDirectory(), '.phan', 'config.php']);
        // Totally cool if the file isn't there
        if (!file_exists($config_file_name)) {
            return;
        }
        // Read the configuration file
        $config = (require $config_file_name);
        // Write each value to the config
        foreach ($config as $key => $value) {
            Config::get()->__set($key, $value);
        }
    }