Jelix\Installer\AbstractInstallLauncher::__construct PHP Méthode

__construct() public méthode

public __construct ( Jelix\Core\Infos\ModuleInfos $moduleInfos, Installer $mainInstaller = null )
$moduleInfos Jelix\Core\Infos\ModuleInfos
$mainInstaller Installer
    function __construct(\Jelix\Core\Infos\ModuleInfos $moduleInfos, Installer $mainInstaller = null)
    {
        $this->moduleInfos = $moduleInfos;
        $this->mainInstaller = $mainInstaller;
    }

Usage Example

 /**
  * @param \Jelix\Core\Infos\ModuleInfos $moduleInfos
  * @param Installer $mainInstaller
  */
 function __construct(\Jelix\Core\Infos\ModuleInfos $moduleInfos, Installer $mainInstaller = null)
 {
     parent::__construct($moduleInfos, $mainInstaller);
     if ($mainInstaller) {
         $ini = $mainInstaller->installerIni;
         $contexts = $ini->getValue($moduleInfos->name . '.contexts', '__modules_data');
         if ($contexts !== null && $contexts !== "") {
             $this->installerContexts = explode(',', $contexts);
         }
     }
 }