protected function loadAllModules()
    {
        $listModules = array_diff(scandir(MODULES_DIR), ['.', '..']);

        foreach ($listModules as $moduleName) {
            $modulePath = realpath(MODULES_DIR.$moduleName); //Symlink

            if (!is_dir($modulePath)) {
                continue;
            }

            $this->moduleList->addModule($moduleName);
        }

        $this->moduleList->readNeedMeDependencies();
        $this->moduleList->generateTree();
    }
protected function loadAllModules()
    {
        $listModules = array_diff(scandir(MODULES_DIR), ['.', '..']);

        foreach ($listModules as $moduleName) {
            $modulePath = realpath(MODULES_DIR.$moduleName); //Symlink

            if (!is_dir($modulePath)) {
                continue;
            }

            $this->moduleList->addModule($moduleName);
        }

        $this->moduleList->readNeedMeDependencies();
        $this->moduleList->generateTree();
    }
protected function loadAllModules ( ) { $ listModules = array_diff ( scandir ( MODULES_DIR ) , [ '.' , '..' ] ) ; foreach ( $ listModules as $ moduleName ) { $ modulePath = realpath ( MODULES_DIR . $ moduleName ) ; //Symlink if ( ! is_dir ( $ modulePath ) ) { continue ; } $ this -> moduleList -> addModule ( $ moduleName ) ; } $ this -> moduleList -> readNeedMeDependencies ( ) ; $ this -> moduleList -> generateTree ( ) ; }
Read all directories in modules directory and add each module to Modules
class.
Generate the load tree.
Not initialize modules !

@return void
Read all directories in modules directory and add each module to Modules class . Generate the load tree . Not initialize modules !