Bart\Configuration\Configuration::loadParsedIni PHP Method

loadParsedIni() protected method

protected loadParsedIni ( string $filePath, string $subclass ) : array
$filePath string Absolute path to file containing configurations
$subclass string Name of the configuration class
return array Contents of configuration parsed as INI with sections
    protected function loadParsedIni($filePath, $subclass)
    {
        /** @var \Bart\Shell $shell */
        $shell = Diesel::create('\\Bart\\Shell');
        if (!$shell->file_exists($filePath)) {
            throw new ConfigurationException("No configuration file found for {$subclass} at {$filePath}");
        }
        // @NOTE we're not using the ConfigResolver to resolve environment
        // ...distinctions by default. To add this ability, a new method should
        // ...be added to this base to resolve and then reset @configurations
        return $shell->parse_ini_file($filePath, true);
    }