protected override void DoProcessing()
        {
            using (var serverManager = new ServerManager())
            {
                var serverManagerWrapper = new ServerManagerWrapper(serverManager, SiteName, VirtualPath);
                var configHelper = new PHPConfigHelper(serverManagerWrapper);
                var phpIniFile = configHelper.GetPHPIniFile();

                WildcardPattern wildcard = PrepareWildcardPattern(Name);

                foreach (var extension in phpIniFile.Extensions)
                {
                    if (!wildcard.IsMatch(extension.Name))
                    {
                        continue;
                    }
                    if (Status == PHPExtensionStatus.Disabled && extension.Enabled)
                    {
                        continue;
                    }
                    if (Status == PHPExtensionStatus.Enabled && !extension.Enabled)
                    {
                        continue;
                    }

                    var extensionItem = new PHPExtensionItem(extension);

                    WriteObject(extensionItem);
                }
            }
        }
Ejemplo n.º 2
0
        protected override void DoProcessing()
        {
            using (ServerManager serverManager = new ServerManager())
            {
                ServerManagerWrapper serverManagerWrapper = new ServerManagerWrapper(serverManager, this.SiteName, this.VirtualPath);
                PHPConfigHelper      configHelper         = new PHPConfigHelper(serverManagerWrapper);
                PHPIniFile           phpIniFile           = configHelper.GetPHPIniFile();

                WildcardPattern wildcard = PrepareWildcardPattern(Name);

                foreach (PHPIniExtension extension in phpIniFile.Extensions)
                {
                    if (!wildcard.IsMatch(extension.Name))
                    {
                        continue;
                    }
                    if (Status == PHPExtensionStatus.Disabled && extension.Enabled)
                    {
                        continue;
                    }
                    if (Status == PHPExtensionStatus.Enabled && !extension.Enabled)
                    {
                        continue;
                    }

                    PHPExtensionItem extensionItem = new PHPExtensionItem(extension);

                    WriteObject(extensionItem);
                }
            }
        }