/**
* Loads all modules referenced by the install file.
*
* @throws FileNotFoundException If the install path of a module not exist.
* @throws NoDirectoryException If the install path of a module points to a
* file.
* @throws InvalidConfigException If a module is not configured correctly.
* @throws NameConflictException If a module has the same name as another
* loaded module.
*/
private function loadModules()
{
$this->modules = new ModuleList();
$this->modules->add(new RootModule($this->rootModuleFile, $this->rootDir));
foreach ($this->rootModuleFile->getInstallInfos() as $installInfo) {
$this->modules->add($this->loadModule($installInfo));
}
}