protected override void DoProcessing()
 {
     using (ServerManager serverManager = new ServerManager())
     {
         ServerManagerWrapper serverManagerWrapper = new ServerManagerWrapper(serverManager, this.SiteName, this.VirtualPath);
         PHPConfigHelper configHelper = new PHPConfigHelper(serverManagerWrapper);
         PHPConfigInfo configInfo = configHelper.GetPHPConfigInfo();
         if (configInfo.RegistrationType == PHPRegistrationType.FastCgi)
         {
             PHPConfigurationItem configurationItem = new PHPConfigurationItem(configInfo);
             WriteObject(configurationItem);
         }
         else
         {
             throw new InvalidOperationException(Resources.PHPIsNotRegisteredError);
         }
     }
 }
Exemple #2
0
 protected override void DoProcessing()
 {
     using (var serverManager = new ServerManager())
     {
         var serverManagerWrapper = new ServerManagerWrapper(serverManager, SiteName, VirtualPath);
         var configHelper         = new PHPConfigHelper(serverManagerWrapper);
         var configInfo           = configHelper.GetPHPConfigInfo();
         if (configInfo.RegistrationType == PHPRegistrationType.FastCgi)
         {
             var configurationItem = new PHPConfigurationItem(configInfo);
             WriteObject(configurationItem);
         }
         else
         {
             throw new InvalidOperationException(Resources.PHPIsNotRegisteredError);
         }
     }
 }