public static function load() {
        $configFile = MODULES_DIR . DS . RouteController::$currentModule . '/Config/config.php';

        if (!file_exists($configFile)) {
            $configFile = BASE_DIR . '/config/config.php';
            if (!file_exists($configFile)) {
                throw new \Exception(ExceptionMessages::CONFIG_FILE_NOT_FOUND);
            }
        }

        if (empty(self::$configs)) {
            self::$configs = require_once $configFile;
        }
    }
public static function load() {
        $configFile = MODULES_DIR . DS . RouteController::$currentModule . '/Config/config.php';

        if (!file_exists($configFile)) {
            $configFile = BASE_DIR . '/config/config.php';
            if (!file_exists($configFile)) {
                throw new \Exception(ExceptionMessages::CONFIG_FILE_NOT_FOUND);
            }
        }

        if (empty(self::$configs)) {
            self::$configs = require_once $configFile;
        }
    }
public static function load ( ) { $ configFile = MODULES_DIR . DS . RouteController :: $ currentModule . '/Config/config.php' ; if ( ! file_exists ( $ configFile ) ) { $ configFile = BASE_DIR . '/config/config.php' ; if ( ! file_exists ( $ configFile ) ) { throw new \ Exception ( ExceptionMessages :: CONFIG_FILE_NOT_FOUND ) ; } } if ( empty ( self :: $ configs ) ) { self :: $ configs = require_once $ configFile ; } }
Finds and loads configuration

@return void
@throws \Exception When config file is not found
Finds and loads configuration