src/Module/ModuleLoader.php
private function loadModule(
		$moduleClass,
		array &$modules,
		array $moduleList,
		DependencyInjectionContainer $dic) {
		/**
		 * @var Module $module
		 */
		$module = $dic->make($moduleClass);

		if (!$module instanceof Module) {
			throw new ConfigurationException(get_class($module) .
				' was configured as a module, but doesn\'t implement ' . Module::class);
		}

		if (!\in_array($module, $modules)) {
			$dic->share($module);

			$this->loadRequiredModules($module, $modules, $moduleList, $dic);

			$modules[] = $module;
		}
	}
private function loadModule(
		$moduleClass,
		array &$modules,
		array $moduleList,
		DependencyInjectionContainer $dic) {
		/**
		 * @var Module $module
		 */
		$module = $dic->make($moduleClass);

		if (!$module instanceof Module) {
			throw new ConfigurationException(get_class($module) .
				' was configured as a module, but doesn\'t implement ' . Module::class);
		}

		if (!\in_array($module, $modules)) {
			$dic->share($module);

			$this->loadRequiredModules($module, $modules, $moduleList, $dic);

			$modules[] = $module;
		}
	}
private function loadModule ( $ moduleClass , array & $ modules , array $ moduleList , DependencyInjectionContainer $ dic ) { /**
		 * @var Module $module
		 */ $ module = $ dic -> make ( $ moduleClass ) ; if ( ! $ module instanceof Module ) { throw new ConfigurationException ( get_class ( $ module ) . ' was configured as a module, but doesn\'t implement ' . Module :: class ) ; } if ( ! \ in_array ( $ module , $ modules ) ) { $ dic -> share ( $ module ) ; $ this -> loadRequiredModules ( $ module , $ modules , $ moduleList , $ dic ) ; $ modules [ ] = $ module ; } }
Load a module by class name.

@param string                       $moduleClass The module class to load.
@param Module[]                     $modules     The list of already loaded modules.
@param array                        $moduleList  The complete module list.
@param DependencyInjectionContainer $dic         The dependency injection container to use for the module.

@return void

@throws ConfigurationException
Load a module by class name .