public static function loadConfigFiles($configPath = false)
    {
        if(!is_dir($configPath)) {
            throw new \Exception("Config directory {$configPath} not found!");
        }

        $filesToBeLoaded = scandir($configPath);
        foreach($filesToBeLoaded as $_file) {
            if(preg_match('/.*\.php/',$_file)) {
                include_once $configPath.DIRECTORY_SEPARATOR.$_file;
            }
        }

        return true;
    }
public static function loadConfigFiles($configPath = false)
    {
        if(!is_dir($configPath)) {
            throw new \Exception("Config directory {$configPath} not found!");
        }

        $filesToBeLoaded = scandir($configPath);
        foreach($filesToBeLoaded as $_file) {
            if(preg_match('/.*\.php/',$_file)) {
                include_once $configPath.DIRECTORY_SEPARATOR.$_file;
            }
        }

        return true;
    }
public static function loadConfigFiles ( $ configPath = false ) { if ( ! is_dir ( $ configPath ) ) { throw new \ Exception ( "Config directory {$configPath} not found!" ) ; } $ filesToBeLoaded = scandir ( $ configPath ) ; foreach ( $ filesToBeLoaded as $ _file ) { if ( preg_match ( '/.*\.php/' , $ _file ) ) { include_once $ configPath . DIRECTORY_SEPARATOR . $ _file ; } } return true ; }
This function is loads all the files in a particular folder, this is meant to the config folder.

@param bool|false $configPath
@return bool
@throws \Exception
This function is loads all the files in a particular folder this is meant to the config folder .