loadConfig() - allows the loader to parse a config file
and return the data as an array value
@param string $path
@return array
421590
public function loadConfig($path)
    {
        //add extension to the config file
        $path = sprintf("%s.%s", $path, $this->config_file_extension);

        //lets try loading the config file data
        return $this->loader->load($path);
    }
1253676
public function load($path)
    {
        $key = $this->getCacheKey($path);

        if (isset($this->data[$key])) {
            return $this->data[$key];
        }

        return null;
    }
932996
public function parsePath($path)
    {
        $parts = explode('/', trim($path, '/'));

        $pathArray = [];
        if ($parts[0] == '.') {
            $pathArray = $this->currentPath;
            array_shift($parts);
        }

        foreach ($parts as $part) {
            if ($part == '..') {
                if (count($pathArray)) {
                    array_pop($pathArray);
                } else {
                    throw new Field\ConfigurationException("Invalid path. To many '..', can't move higher root.");
                }
            } else {
                $pathArray[] = $part;
            }
        }

        return $pathArray;
    }
726357
protected function loadConfigurationFile(string $configurationPath): array
    {
        $configurations = [];

        if ($configurationPath && is_dir($configurationPath)) {
            if (is_dir($configurationPath)) {
                $configurationFiles = new FilesystemIterator($configurationPath, FilesystemIterator::SKIP_DOTS);

                /** @var SplFileInfo $configurationFiles */
                foreach ($configurationFiles as $file) {
                    $configurations += $this->getConfigurationFile($file);
                }
            } else {
                if (is_file($configurationPath)) {
                    $configurations += $this->getConfigurationFile($configurationPath);
                }
            }
        }

        return $configurations;
    }
1327718
private static function load($path)
    {
        $path = str_replace('.', '/', $path);

        $path = FULL_PATH . $path;

        if(substr($path, -4) != '.php')
        {
            $path = $path . '.php';
        }

        return $path;
    }
925457
protected function readConfig(string $path): array
    {
        if (! is_readable($path)) {
            throw new DefinitionProviderException(sprintf('File "%s" with definition is not readable.', $path));
        }

        $content = file_get_contents($path);
        $config  = $this->parser->parse($content);
        $schema  = $this->getSchema();

        return $this->processor->process($schema, [$config]);
    }
1122903
private static function importFromPath(string $path): array
    {
        $conf = [];
        $paths = new DirectoryIterator($path);

        foreach ($paths as $path) {
            if ($path->isDot()) {
                continue;
            }

            if ($path->isDir()) {
                $conf[$path->getFileName()] = static::importFromPath($path->getPathName());
            }

            if ($path->isFile()) {
                if ($path->getExtension() === 'yml') {
                    $pathinfo = pathinfo($path->getFileName());

                    $conf[$pathinfo['filename']] = (array) static::readFile($path->getPathName(), []);

                    unset($pathinfo);
                }
            }
        }

        unset($paths);

        return $conf;
    }
616304
private static function loadDefinitionsFromPath(string $path): array
    {
        if (!\file_exists($path)) {
            throw new \RuntimeException(\sprintf('Path "%s" does not exist', $path));
        }

        if (!\is_dir($path)) {
            return self::loadDefinitionsFromFile($path);
        }

        $definitions = [];
        foreach (\glob($path . '/*.php', \GLOB_ERR) as $file) {
            if (\is_file($file)) {
                $definitions[] = self::loadDefinitionsFromFile($file);
            }
        }

        return \count($definitions) === 0 ? [] : \array_merge(...$definitions);
    }
1133290
public function loadConfig()
    {
        $path = $this->getConfigPath();

        if (!is_dir($path)) {
            return [];
        }

        $configs = Cache::remember("moduleConfig::{$path}", Carbon::now()->addMinutes(10), function () use ($path) {
            $configs = [];
            foreach (new \DirectoryIterator($path) as $file) {
                if ($file->isDot() or strpos($file->getFilename(), '.php') === false) {
                    continue;
                }
                $key = $file->getBasename('.php');
                $configs[$key] = array_merge_recursive(require $file->getPathname(), app('config')->get($key, []));
            }

            return $configs;
        });

        return $configs;
    }
837537
public function findConfigFile($path)
    {
        $configFilePath = rtrim($path, '/') . '/' . PHPFormatter::CONFIG_FILE_NAME;
        $config = [];
        if (is_file($configFilePath)) {
            $yamlParser = new Yaml();
            $config = $yamlParser->parse(file_get_contents($configFilePath));
        }

        return $config;
    }
1104409
public static function loadDotFile($path)
    {
        $file = file_get_contents($path);
        if ($file === false) {
            return null;
        }

        $file = str_replace("\r", "\n", $file);      // Turn CR into LF
        $file = str_replace("\n\n", "\n", $file);   // Turn LFLF into LF
        $lines = explode("\n", $file);

        $data = [];

        $lineCount = count($lines);

        for ($i = 0; $i < $lineCount; $i++) {
            $line = trim($lines[$i]);
            if (strlen($line) === 0) {
                continue;
            }

            $split = explode('=', $line, 2);
            if (count($split) < 2) {
                throw new Exception\ConfigurationException("Invalid data in .bitrank file on line $i. ($line)");
            }

            $key = $split[0];
            $value = $split[1];

            $data[$key] = $value;
        }

        return $data;
    }
131940
public static function loadPatternsInPath($path)
    {
        $patterns = array();

        if ($handle = opendir($path)) {
            while (false !== ($entry = readdir($handle))) {
                $fullPath = $path . '/' . $entry;

                if ($entry != '..' && $entry != '.' && is_dir($fullPath)) {
                    $id = trim(str_replace(Primer::$PATTERN_PATH, '', $fullPath), '/');

                    // Load the pattern
                    $patterns[] = new Pattern($id);
                }
            }

            closedir($handle);
        }

        return $patterns;
    }
1205157
public function getConfigValue($path)
    {
        return $this->relevanceConfig->getValue($path, $this->getScope(), $this->getScopeCode());
    }
92841
public function load($path)
    {
        $path = $this->findAbsolutePath($path);

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)
        );
        $paths = array_map('strval', iterator_to_array($iterator));
        uasort($paths, 'strnatcasecmp');

        $features = array();

        foreach ($paths as $path) {
            $path = (string) $path;
            $loader = $this->gherkin->resolveLoader($path);

            if (null !== $loader) {
                $features = array_merge($features, $loader->load($path));
            }
        }

        return $features;
    }
870516
public function load($path)
	{
		$dir = new \DirectoryIterator(realpath($path));
		foreach ($dir as $fileInfo) {
			if($fileInfo->isFile() && $fileInfo->isReadable() && $fileInfo->getExtension()=='php') {
				$array = include $fileInfo->getPathname();
				$fileName = $fileInfo->getFilename();
				$keyName = substr($fileName, 0, strpos($fileName, '.'));
				$this->commonSettings[$keyName] = $array;
			}
		}
	}
92885
public function loadYmlFile($fileName, $path)
    {
        $configDirectories = array(($path!=null)?$path:$this->rootDir);

        $locator = new FileLocator($configDirectories);
        $ymlFile = $locator->locate($fileName, null, true);
        $ymlDatas = Yaml::parse($ymlFile);

        $dataArray = array();
        foreach ($ymlDatas as $key => $data) {
            $dataArray[$key] = array_merge(
                $data);
        }

        return $dataArray;
    }
1287948
public function parse($path)
	{
		$data = @parse_ini_file($path, true);

		if (!$data)
		{
			$error = error_get_last();

			throw new ParseException($error);
		}

		return $data;
	}