src/Koldy/Application.php
public static function registerModule(string $name): void
    {
        if (!isset(static::$registeredModules[$name])) {
            $modulePath = static::getModulePath($name);

            static::prependIncludePath($modulePath . 'controllers', $modulePath . 'library');
            static::$registeredModules[$name] = true;
            $initPath = $modulePath . 'init.php';

            if (is_file($initPath)) {
                require $initPath;
            }
        }
    }
public static function registerModule(string $name): void
    {
        if (!isset(static::$registeredModules[$name])) {
            $modulePath = static::getModulePath($name);

            static::prependIncludePath($modulePath . 'controllers', $modulePath . 'library');
            static::$registeredModules[$name] = true;
            $initPath = $modulePath . 'init.php';

            if (is_file($initPath)) {
                require $initPath;
            }
        }
    }
public static function registerModule ( string $ name ) : void { if ( ! isset ( static :: $ registeredModules [ $ name ] ) ) { $ modulePath = static :: getModulePath ( $ name ) ; static :: prependIncludePath ( $ modulePath . 'controllers' , $ modulePath . 'library' ) ; static :: $ registeredModules [ $ name ] = true ; $ initPath = $ modulePath . 'init.php' ; if ( is_file ( $ initPath ) ) { require $ initPath ; } } }
Register module by registering include path and by running init.php in module root folder

@param string $name

@example if your module is located on "/application/modules/invoices", then pass "invoices"
Register module by registering include path and by running init . php in module root folder