示例#1
0
        internal RemoteObjectCollection <PHPConfigIssue> GetConfigIssues()
        {
            object o = Invoke("GetConfigIssues");

            if (o != null)
            {
                RemoteObjectCollection <PHPConfigIssue> configIssues = new RemoteObjectCollection <PHPConfigIssue>();
                configIssues.SetData(o);
                return(configIssues);
            }

            return(null);
        }
示例#2
0
        internal RemoteObjectCollection <PHPVersion> GetAllPHPVersions()
        {
            object o = Invoke("GetAllPHPVersions");

            if (o != null)
            {
                RemoteObjectCollection <PHPVersion> versions = new RemoteObjectCollection <PHPVersion>();
                versions.SetData(o);
                return(versions);
            }

            return(null);
        }
示例#3
0
        public object GetConfigIssues()
        {
            RemoteObjectCollection <PHPConfigIssue> configIssues = null;

            try
            {
                var mgmtUnitWrapper = new ManagementUnitWrapper(ManagementUnit);
                var configHelper    = new PHPConfigHelper(mgmtUnitWrapper);
                configIssues = configHelper.ValidateConfiguration();
            }
            catch (FileNotFoundException)
            {
                RaiseException("ErrorPHPIniNotFound");
            }
            catch (InvalidOperationException)
            {
                RaiseException("ErrorPHPIsNotRegistered");
            }

            return((configIssues != null) ? configIssues.GetData() : null);
        }
示例#4
0
        public object GetAllPHPVersions()
        {
            EnsureServerOrSiteConnection();
            RemoteObjectCollection <PHPVersion> versions = null;

            try
            {
                var mgmtUnitWrapper = new ManagementUnitWrapper(ManagementUnit);
                var configHelper    = new PHPConfigHelper(mgmtUnitWrapper);
                versions = configHelper.GetAllPHPVersions();
            }
            catch (FileNotFoundException)
            {
                RaiseException("ErrorPHPIniNotFound");
            }
            catch (InvalidOperationException)
            {
                RaiseException("ErrorPHPIsNotRegistered");
            }

            return((versions != null) ? versions.GetData() : null);
        }
示例#5
0
        public void AddOrUpdateSettings(object settingsData)
        {
            EnsureServerConnection();

            var settings = new RemoteObjectCollection <PHPIniSetting>();

            settings.SetData(settingsData);

            try
            {
                var mgmtUnitWrapper = new ManagementUnitWrapper(ManagementUnit);
                var configHelper    = new PHPConfigHelper(mgmtUnitWrapper);
                configHelper.AddOrUpdatePHPIniSettings(settings);
            }
            catch (FileNotFoundException)
            {
                RaiseException("ErrorPHPIniNotFound");
            }
            catch (InvalidOperationException)
            {
                RaiseException("ErrorPHPIsNotRegistered");
            }
        }
示例#6
0
        public void UpdateExtensions(object extensionsData)
        {
            EnsureServerConnection();

            var extensions = new RemoteObjectCollection <PHPIniExtension>();

            extensions.SetData(extensionsData);

            try
            {
                var mgmtUnitWrapper = new ManagementUnitWrapper(ManagementUnit);
                var configHelper    = new PHPConfigHelper(mgmtUnitWrapper);
                configHelper.UpdateExtensions(extensions);
            }
            catch (FileNotFoundException)
            {
                RaiseException("ErrorPHPIniNotFound");
            }
            catch (InvalidOperationException)
            {
                RaiseException("ErrorPHPIsNotRegistered");
            }
        }
示例#7
0
 internal void AddOrUpdateSettings(RemoteObjectCollection <PHPIniSetting> settings)
 {
     Invoke("AddOrUpdateSettings", settings.GetData());
 }
示例#8
0
 internal void UpdateExtensions(RemoteObjectCollection <PHPIniExtension> extensions)
 {
     Invoke("UpdateExtensions", extensions.GetData());
 }