Bart\Configuration\Configuration::load PHP Method

load() private method

Load the configurations from the config file for subclass
private load ( ) : array
return array The parsed array from the configuration file
    private function load()
    {
        $basePath = $this->configsPath();
        if (!$basePath) {
            throw new ConfigurationException('Configuration root path not set! Please call configure()');
        }
        $subclass = get_called_class();
        $indSlash = strrpos($subclass, '\\');
        if ($indSlash !== false) {
            // Strip off namespace
            $subclass = substr($subclass, $indSlash + 1);
        }
        // Strip off "Config"
        $subclass = substr($subclass, 0, -1 * strlen('Config'));
        // Chop any trailing underscore for non-camel cased names
        $name = strtolower(chop($subclass, '_'));
        $filePath = $basePath . "/{$name}.conf";
        if (!array_key_exists($filePath, self::$configCache)) {
            self::$configCache[$filePath] = $this->loadParsedIni($filePath, $name);
        }
        $this->filePath = $filePath;
        $this->configurations = self::$configCache[$filePath];
    }