示例#1
0
 /**
  * Loads a module for the given install info.
  *
  * @param InstallInfo $installInfo The install info.
  *
  * @return Module The module.
  */
 private function loadModule(InstallInfo $installInfo)
 {
     $installPath = Path::makeAbsolute($installInfo->getInstallPath(), $this->rootDir);
     $moduleFile = null;
     $loadError = null;
     try {
         $moduleFile = $this->loadModuleFile($installPath);
     } catch (InvalidConfigException $loadError) {
     } catch (UnsupportedVersionException $loadError) {
     } catch (FileNotFoundException $loadError) {
     } catch (NoDirectoryException $loadError) {
     }
     $loadErrors = $loadError ? array($loadError) : array();
     return new Module($moduleFile, $installPath, $installInfo, $loadErrors);
 }
示例#2
0
 /**
  * Loads a module for the given install info.
  *
  * @param InstallInfo $installInfo The install info.
  *
  * @return Module The module.
  */
 private function loadModule(InstallInfo $installInfo)
 {
     $installPath = Path::makeAbsolute($installInfo->getInstallPath(), $this->rootDir);
     $moduleFile = null;
     $loadError = null;
     // Catch and log exceptions so that single modules cannot break
     // the whole repository
     try {
         $moduleFile = $this->loadModuleFile($installPath);
     } catch (InvalidConfigException $loadError) {
     } catch (UnsupportedVersionException $loadError) {
     } catch (FileNotFoundException $loadError) {
     } catch (NoDirectoryException $loadError) {
     }
     $loadErrors = $loadError ? array($loadError) : array();
     return new Module($moduleFile, $installPath, $installInfo, $loadErrors);
 }