Пример #1
0
        public void UpdateExtensions(object extensionsData)
        {
            EnsureServerConnection();

            RemoteObjectCollection<PHPIniExtension> extensions = new RemoteObjectCollection<PHPIniExtension>();
            ((IRemoteObject)extensions).SetData(extensionsData);

            try
            {
                PHPConfigHelper configHelper = new PHPConfigHelper(ManagementUnit);
                configHelper.UpdateExtensions(extensions);
            }
            catch (FileNotFoundException)
            {
                RaiseException("ErrorPHPIniNotFound");
            }
        }
Пример #2
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");
            }
        }