Get the configuration file to use.

@return string
426288
public function getConfigFile() : string
    {
        if (empty($this->configFile)) {
            $this->configFile = getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG;
        }
        return $this->configFile;
    }
591046
protected function resolveConfigFile()
    {
        $ruleSet = $this->getInput()->getOption('ruleSet');

        if (null === $ruleSet && file_exists('phpsemver.xml')) {
            return 'phpsemver.xml';
        }

        if (null === $ruleSet) {
            $ruleSet = 'SemVer2';
        }

        if (file_exists($ruleSet)) {
            return $ruleSet;
        }

        $defaultPath = PHPSEMVER_LIB_PATH . '/PHPSemVer/Rules/';
        if (file_exists($defaultPath . $ruleSet . '.xml')) {
            return $defaultPath . $ruleSet . '.xml';
        }

        throw new \InvalidArgumentException(
            'Could not find rule set: ' . $ruleSet
        );
    }
84790
private function getSettings()
    {
        $rootPath = $this->complement['path']['root'];
        $configFile = $rootPath . 'config/';

        if (is_dir($configFile) && $handle = scandir($configFile)) {
            $files = array_slice($handle, 2);

            foreach ($files as $file) {
                $content = require $configFile . $file;
                $merge = array_merge($this->complement, $content);
                $this->complement = $merge;
            }
        }

        $this->complement['path']['root'] = $rootPath;
        $this->complement['path']['config'] = $configFile;
    }
1076119
public function getConfiguration()
    {
        $rest = $this->callService('GET', self::API_DOWNLOAD_CONFIG);

        return $rest->getModel(models\Download\Config\DownloadConfig::class);
    }
534319
public function getEnvironment()
	{
		$environment_file = $this->resolvePath('config/environment');
		
		if (file_exists($environment_file)) {
			$environment = trim(file_get_contents($environment_file));
		} else {
			$environment = 'local';
		}
		
		return $environment;
	}
27032
protected function getConfig()
    {
        if ($this->config !== null) {
            return $this->config;
        }

        $this->config = $this->getDefaultConfig();

        $app = $this->getContainer();

        $file = $app['filesystem']->getFile(strtolower("extensions_config://{$this->getName()}.{$this->getVendor()}.yml"));

        if (!$file->exists()) {
            try {
                $this->copyDistFile($file);
            } catch (RuntimeException $e) {
                return $this->config;
            }
        }

        $this->addConfig($file);

        $localFile = $file->getParent()->getFile($file->getFilename('.yml') . '_local.yml');
        if ($localFile->exists()) {
            $this->addConfig($localFile);
        }

        return $this->config;
    }
758686
private function defaultConfiguration() : string
    {
        $supportedFiles = [
            'larastan.neon',
            'phpstan.neon',
            'phpstan.neon.dist',
        ];

        foreach ($supportedFiles as $file) {
            $filePath = base_path($file);

            if (file_exists($filePath)) {
                return $filePath;
            }
        }

        return __DIR__.'/../../extension.neon';
    }
27502
public function getConfig()
    {
        $container = $this->getContainerBuilder();
        $this->defaults['scanDirs'] = $container->expand('%appDir%');

        return parent::getConfig($this->defaults);
    }
67243
public function getConfigPath()
    {
        if (null == $this->configPath) {
            $this->configPath = getcwd().'/Configuration';
            Configuration::addPath($this->configPath);
        }
        return $this->configPath;
    }
1339578
public function getConfig()
    {
        if ($this->config) {
            return $this->config;
        }

        $config = $this->getDefaultConfig();

        // read from database
        $result = $this->connection->fetchAll('SELECT type, class FROM fusio_provider ORDER BY class ASC');
        foreach ($result as $row) {
            $this->mergeClass($config, $row['type'], $row['class']);
        }

        // read from file
        if (!empty($this->file)) {
            $result = include($this->file);

            if (is_array($result)) {
                foreach ($result as $type => $classes) {
                    foreach ($classes as $class) {
                        $this->mergeClass($config, $type, $class);
                    }
                }
            }
        }

        return $this->config = new ProviderConfig($config);
    }
829810
public function getConfig()
    {
        if ($this->cache instanceof Cache\CacheInterface && !empty($configs = $this->cache->getConfig())) {
            return $configs;
        }

        $configs = $this->moduleHandler->getModulesConfig();
        foreach ($this->files as $file) {
            $config = require $file;
            if (!is_array($config)) {
                throw new Exception\RuntimeException(sprintf('The config in "%s" file must be array data type', $file));
            }
            $configs = ArrayUtils::merge($configs, require $file);
        }

        return $this->cleanUp($configs);
    }
463972
protected function getConfigFile()
    {
        $inputPath = $this->input->getArgument('path');

        $dir = './';

        if (1 == count($inputPath) && $first = reset($inputPath)) {
            $dir = is_dir($first) ? $first : dirname($first);
        }

        $filename = rtrim($dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.phplint.yml';

        return realpath($filename);
    }
987013
public function getConfig()
	{
		return $this->_node->__isset( 'config' ) && is_array( $this->_node->config ) ? $this->_node->__get( 'config' ) : array();
	}
603417
public static function getAutogeneratedFile()
    {
        $config = Bootstrap::getSingleton()->getConfig();

        $file = 'autogenerated.config.yml';
        if (isset($config['installer']['autogenerated_path'])) {
            $file = $config['installer']['autogenerated_path'];
        }
        return $file;
    }
996184
public function getConfigAction() {
        $cfgr = Mage::getModel('turpentine/varnish_admin')
            ->getConfigurator();
        if (is_null($cfgr)) {
            $this->_getSession()->addError($this->__('Failed to load configurator'));
            $this->_redirect('*/cache');
        } else {
            $vcl = $cfgr->generate(
                Mage::helper('turpentine')->shouldStripVclWhitespace('download') );
            $this->getResponse()
                ->setHttpResponseCode(200)
                ->setHeader('Content-Type', 'text/plain', true)
                ->setHeader('Content-Length', strlen($vcl))
                ->setHeader('Content-Disposition',
                    'attachment; filename=default.vcl')
                ->setBody($vcl);
            return $this;
        }
    }
119492
private function loadConfigFromFiles()
    {
        /** @var \Core\Services\Contracts\Config $config */
        $config = DI::getInstance()->get('config');

        foreach (scandir($this->configPath) as $file) {
            if (is_file($this->configPath . DIRECTORY_SEPARATOR . $file) && $file[0] != '.') {
                /** @noinspection PhpIncludeInspection */
                $config->set(basename($file, '.php'), require $this->configPath . DIRECTORY_SEPARATOR . $file);
            }
        }

        return $config;
    }
194696
public function getConfigDirectory()
    {
        $directory = $this->baseDir.DIRECTORY_SEPARATOR.BundleInterface::CONFIG_DIRECTORY_NAME;
        if (false === is_dir($directory)) {
            $directory = $this->baseDir.DIRECTORY_SEPARATOR.BundleInterface::OLD_CONFIG_DIRECTORY_NAME;
        }

        return $directory;
    }