src/Tomahawk/Config/ConfigManager.php
public function load($force = false)
    {
        $this->config = array();

        // Check if we have a compiled cached file
        if ( ! $force && $this->cacheFile && file_exists($this->cacheFile)) {
            $this->config = include($this->cacheFile);
            return;
        }

        foreach ($this->configDirectories as $configDirectory) {

            $finder = new Finder();
            $finder->in($configDirectory)->depth('== 0')->files()->name('*.php');

            foreach ($finder as $file) {
                /**
                 * @var \Symfony\Component\Finder\SplFileInfo $file
                 */

                // If file starts with config_ its a compiled one so ignore
                if (Str::is($file->getFilename(), '*config_*')) {
                    continue;
                }

                $configName = substr($file->getFilename(), 0, -4);

                $values = $this->loader->load($file->getRealPath());

                foreach ($values as $config => $value) {

                    $key = sprintf('%s.%s', $configName, $config);

                    $this->set($key, $value);
                }
            }
        }

    }
public function load($force = false)
    {
        $this->config = array();

        // Check if we have a compiled cached file
        if ( ! $force && $this->cacheFile && file_exists($this->cacheFile)) {
            $this->config = include($this->cacheFile);
            return;
        }

        foreach ($this->configDirectories as $configDirectory) {

            $finder = new Finder();
            $finder->in($configDirectory)->depth('== 0')->files()->name('*.php');

            foreach ($finder as $file) {
                /**
                 * @var \Symfony\Component\Finder\SplFileInfo $file
                 */

                // If file starts with config_ its a compiled one so ignore
                if (Str::is($file->getFilename(), '*config_*')) {
                    continue;
                }

                $configName = substr($file->getFilename(), 0, -4);

                $values = $this->loader->load($file->getRealPath());

                foreach ($values as $config => $value) {

                    $key = sprintf('%s.%s', $configName, $config);

                    $this->set($key, $value);
                }
            }
        }

    }
Load config files

@param bool|false $force