src/Application/AbstractApplication.php
public function registerModules($modules = [])
    {
        for($i = 0; $i < sizeof($modules); $i++) {
            $moduleName = $modules[$i];

            $module = $this->createNew($moduleName);

            if (!$module instanceof ModuleInterface) {
                throw new InvalidModuleException('The module at position '.($i+1).' is invalid');
            }

            $serviceProvider = $module->getServiceProvider();
            $this->getContainer()->registerServices($serviceProvider);
        }
    }
public function registerModules($modules = [])
    {
        for($i = 0; $i < sizeof($modules); $i++) {
            $moduleName = $modules[$i];

            $module = $this->createNew($moduleName);

            if (!$module instanceof ModuleInterface) {
                throw new InvalidModuleException('The module at position '.($i+1).' is invalid');
            }

            $serviceProvider = $module->getServiceProvider();
            $this->getContainer()->registerServices($serviceProvider);
        }
    }
public function registerModules ( $ modules = [ ] ) { for ( $ i = 0 ; $ i < sizeof ( $ modules ) ; $ i ++ ) { $ moduleName = $ modules [ $ i ] ; $ module = $ this -> createNew ( $ moduleName ) ; if ( ! $ module instanceof ModuleInterface ) { throw new InvalidModuleException ( 'The module at position ' . ( $ i + 1 ) . ' is invalid' ) ; } $ serviceProvider = $ module -> getServiceProvider ( ) ; $ this -> getContainer ( ) -> registerServices ( $ serviceProvider ) ; } }
Register some modules
Register some modules