src/Application.php
protected function loadExternalConfig()
    {
        $config = new Repository(static::getDefaultConfig());
        $filesystem = new Filesystem();

        foreach ($this->getConfigFiles($filesystem) as $filename) {

            $this->output->writeln("<info>Reading config from <path>{$filename}</path></info>");

            if ($filesystem->extension($filename) == 'php') {
                $configValues = $filesystem->getRequire($filename);
            } else {
                $configValues = Yaml::parse($filesystem->get($filename));
            }

            $config->set(array_dot($configValues));
        }

        $this->container->instance('config', $config);
    }
protected function loadExternalConfig()
    {
        $config = new Repository(static::getDefaultConfig());
        $filesystem = new Filesystem();

        foreach ($this->getConfigFiles($filesystem) as $filename) {

            $this->output->writeln("<info>Reading config from <path>{$filename}</path></info>");

            if ($filesystem->extension($filename) == 'php') {
                $configValues = $filesystem->getRequire($filename);
            } else {
                $configValues = Yaml::parse($filesystem->get($filename));
            }

            $config->set(array_dot($configValues));
        }

        $this->container->instance('config', $config);
    }
protected function loadExternalConfig ( ) { $ config = new Repository ( static :: getDefaultConfig ( ) ) ; $ filesystem = new Filesystem ( ) ; foreach ( $ this -> getConfigFiles ( $ filesystem ) as $ filename ) { $ this -> output -> writeln ( "<info>Reading config from <path>{$filename}</path></info>" ) ; if ( $ filesystem -> extension ( $ filename ) == 'php' ) { $ configValues = $ filesystem -> getRequire ( $ filename ) ; } else { $ configValues = Yaml :: parse ( $ filesystem -> get ( $ filename ) ) ; } $ config -> set ( array_dot ( $ configValues ) ) ; } $ this -> container -> instance ( 'config' , $ config ) ; }
Load the external config files specified by the command line option.
Load the external config files specified by the command line option .