src/Koldy/Application.php
public static function getConfig(string $name, bool $isPointerConfig = false): Config
    {
        if (isset(static::$configs[$name])) {
            return static::$configs[$name];
        }

	    // otherwise, lookup for config on file system
	    $applicationConfig = static::$configs['application'] ?? null;

	    if ($applicationConfig === null) {
		    throw new ConfigException('The main "application" config is NOT passed to the web app so framework can\'t load other configs because it doesn\'t know where they are');
	    }

	    $configFiles = $applicationConfig->get('config', []);

        $config = new Config($name, $isPointerConfig);

        if (array_key_exists($name, $configFiles)) {
            $path = stream_resolve_include_path($configFiles[$name]);
        } else {
            $path = static::$configsPath . $name . '.php';
        }

        $config->loadFrom($path);
        static::$configs[$name] = $config;
        return $config;
    }
public static function getConfig(string $name, bool $isPointerConfig = false): Config
    {
        if (isset(static::$configs[$name])) {
            return static::$configs[$name];
        }

	    // otherwise, lookup for config on file system
	    $applicationConfig = static::$configs['application'] ?? null;

	    if ($applicationConfig === null) {
		    throw new ConfigException('The main "application" config is NOT passed to the web app so framework can\'t load other configs because it doesn\'t know where they are');
	    }

	    $configFiles = $applicationConfig->get('config', []);

        $config = new Config($name, $isPointerConfig);

        if (array_key_exists($name, $configFiles)) {
            $path = stream_resolve_include_path($configFiles[$name]);
        } else {
            $path = static::$configsPath . $name . '.php';
        }

        $config->loadFrom($path);
        static::$configs[$name] = $config;
        return $config;
    }
public static function getConfig ( string $ name , bool $ isPointerConfig = false ) : Config { if ( isset ( static :: $ configs [ $ name ] ) ) { return static :: $ configs [ $ name ] ; } // otherwise, lookup for config on file system $ applicationConfig = static :: $ configs [ 'application' ] ?? null ; if ( $ applicationConfig === null ) { throw new ConfigException ( 'The main "application" config is NOT passed to the web app so framework can\'t load other configs because it doesn\'t know where they are' ) ; } $ configFiles = $ applicationConfig -> get ( 'config' , [ ] ) ; $ config = new Config ( $ name , $ isPointerConfig ) ; if ( array_key_exists ( $ name , $ configFiles ) ) { $ path = stream_resolve_include_path ( $ configFiles [ $ name ] ) ; } else { $ path = static :: $ configsPath . $ name . '.php' ; } $ config -> loadFrom ( $ path ) ; static :: $ configs [ $ name ] = $ config ; return $ config ; }
Get the configs from any config file, fetched by config name. Config name is the name on file system,
so you can fetch Koldy's config files or your own configs.

@param string $name
@param bool $isPointerConfig

@return Config
@throws Exception
Get the configs from any config file fetched by config name . Config name is the name on file system so you can fetch Koldy s config files or your own configs .