src/Application/SimpleApplication.php
private function installModules(array $modules)
    {
        try{
            foreach($modules as $module_class)
            {
                /** @var ModuleInterface $module */
                $module = new $module_class();
                $module->install($this);
                $this->installed_modules[] = $module_class;

                $this->onModuleInstalled($module_class);

                $component_type = call_user_func([$module_class, 'declareComponentType']);

                $this->onComponentInstalled($component_type);
            }
        }
        catch(\Throwable $e)
        {
            throw new ApplicationInstallationException(__METHOD__ . ' failed: ' . $e->getMessage() , $e);
        }
    }
private function installModules(array $modules)
    {
        try{
            foreach($modules as $module_class)
            {
                /** @var ModuleInterface $module */
                $module = new $module_class();
                $module->install($this);
                $this->installed_modules[] = $module_class;

                $this->onModuleInstalled($module_class);

                $component_type = call_user_func([$module_class, 'declareComponentType']);

                $this->onComponentInstalled($component_type);
            }
        }
        catch(\Throwable $e)
        {
            throw new ApplicationInstallationException(__METHOD__ . ' failed: ' . $e->getMessage() , $e);
        }
    }
private function installModules ( array $ modules ) { try { foreach ( $ modules as $ module_class ) { /** @var ModuleInterface $module */ $ module = new $ module_class ( ) ; $ module -> install ( $ this ) ; $ this -> installed_modules [ ] = $ module_class ; $ this -> onModuleInstalled ( $ module_class ) ; $ component_type = call_user_func ( [ $ module_class , 'declareComponentType' ] ) ; $ this -> onComponentInstalled ( $ component_type ) ; } } catch ( \ Throwable $ e ) { throw new ApplicationInstallationException ( __METHOD__ . ' failed: ' . $ e -> getMessage ( ) , $ e ) ; } }
@param array $modules

@throws ApplicationInstallationException
@param array $modules