Puli\Manager\Api\Module\RootModuleFile::getInstallInfo PHP Метод

getInstallInfo() публичный Метод

Returns the install info of an installed module.
public getInstallInfo ( string $moduleName ) : Puli\Manager\Api\Module\InstallInfo
$moduleName string The module name.
Результат Puli\Manager\Api\Module\InstallInfo The install info.
    public function getInstallInfo($moduleName)
    {
        if (!isset($this->installInfos[$moduleName])) {
            throw new NoSuchModuleException(sprintf('Could not get install info: The module "%s" is not installed.', $moduleName));
        }
        return $this->installInfos[$moduleName];
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function removeModule($name)
 {
     // Only check that this is a string. The error message "not found" is
     // more helpful than e.g. "module name must contain /".
     Assert::string($name, 'The module name must be a string. Got: %s');
     $this->assertModulesLoaded();
     if ($this->rootModuleFile->hasInstallInfo($name)) {
         $installInfo = $this->rootModuleFile->getInstallInfo($name);
         $this->rootModuleFile->removeInstallInfo($name);
         try {
             $this->moduleFileStorage->saveRootModuleFile($this->rootModuleFile);
         } catch (Exception $e) {
             $this->rootModuleFile->addInstallInfo($installInfo);
             throw $e;
         }
     }
     $this->modules->remove($name);
 }
All Usage Examples Of Puli\Manager\Api\Module\RootModuleFile::getInstallInfo