Example #1
0
            /// <summary>
            /// Gets or sets a value of a legacy configuration option.
            /// </summary>
            private static PhpValue GetSet(Context ctx, IPhpConfigurationService config, string option, PhpValue value, IniAction action)
            {
                var local = config.Get <IconvConfig>();

                if (local == null)
                {
                    return(PhpValue.False);
                }

                switch (option)
                {
                case "iconv.input_encoding":
                    return(StandardPhpOptions.GetSet(ref local.InputEncoding, "ISO-8859-1", value, action));

                case "iconv.internal_encoding":
                    return(StandardPhpOptions.GetSet(ref local.InternalEncoding, "ISO-8859-1", value, action));

                case "iconv.output_encoding":
                    return(StandardPhpOptions.GetSet(ref local.OutputEncoding, "ISO-8859-1", value, action));
                }

                return(PhpValue.False);
            }
Example #2
0
            /// <summary>
            /// Gets or sets a value of a legacy configuration option.
            /// </summary>
            private static PhpValue GetSet(Context ctx, IPhpConfigurationService config, string option, PhpValue value, IniAction action)
            {
                var local = config.Get <IconvConfig>();

                if (local == null)
                {
                    return(PhpValue.Null);
                }

                switch (option)
                {
                case "iconv.input_encoding":
                    return((PhpValue)StandardPhpOptions.GetSet(ref local.InputEncoding, "ISO-8859-1", value, action));

                case "iconv.internal_encoding":
                    return((PhpValue)StandardPhpOptions.GetSet(ref local.InternalEncoding, "ISO-8859-1", value, action));

                case "iconv.output_encoding":
                    return((PhpValue)StandardPhpOptions.GetSet(ref local.OutputEncoding, "ISO-8859-1", value, action));
                }

                Debug.Fail("Option '" + option + "' is not currently supported.");
                return(PhpValue.Null);
            }