/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = ZlibLibraryDescriptor.ExtensionName; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); IniOptions.Register("zlib.output_compression", IniFlags.Supported | IniFlags.Global, d, s); IniOptions.Register("zlib.output_compression_level", IniFlags.Supported | IniFlags.Global, d, s); IniOptions.Register("zlib.output_handler", IniFlags.Supported | IniFlags.Global, d, s); //// global: //IniOptions.Register("mssql.max_links", IniFlags.Supported | IniFlags.Global, d, s); //IniOptions.Register("mssql.secure_connection", IniFlags.Supported | IniFlags.Global, d, s); //IniOptions.Register("mssql.allow_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); //IniOptions.Register("mssql.max_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); //// local: //IniOptions.Register("mssql.connect_timeout", IniFlags.Supported | IniFlags.Local, d, s); //IniOptions.Register("mssql.timeout", IniFlags.Supported | IniFlags.Local, d, s); //IniOptions.Register("mssql.batchsize", IniFlags.Supported | IniFlags.Local, d, s); //IniOptions.Register("mssql.min_error_severity", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.min_message_severity", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.compatability_mode", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.textsize", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.textlimit", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.datetimeconvert", IniFlags.Unsupported | IniFlags.Local, d, s); //IniOptions.Register("mssql.max_procs", IniFlags.Unsupported | IniFlags.Local, d, s); }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = "iconv"; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); IniOptions.Register("iconv.input_encoding", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("iconv.internal_encoding", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("iconv.output_encoding", IniFlags.Supported | IniFlags.Local, d, s); }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = PDOMySQLLibraryDescriptor.ExtensionName; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); // local: // global: }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = SQLiteLibraryDescriptor.ExtensionName; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); // local: // global: IniOptions.Register("sqlite.assoc_case", IniFlags.Supported | IniFlags.Global, d, s); }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = "standard"; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); // highlighting: IniOptions.Register("highlight.bg", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("highlight.comment", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("highlight.default", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("highlight.html", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("highlight.keyword", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("highlight.string", IniFlags.Supported | IniFlags.Local, d, s); // e-mail: IniOptions.Register("SMTP", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("smtp_port", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("sendmail_from", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("sendmail_path", IniFlags.Unsupported | IniFlags.Global, d, s); IniOptions.Register("mail.add_x_header", IniFlags.Supported | IniFlags.Local, d, s); // session: IniOptions.Register("session.cache_expire", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.cache_limiter", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.serialize_handler", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.save_path", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.gc_maxlifetime", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.gc_probability", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.gc_divisor", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.cookie_domain", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.cookie_lifetime", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.cookie_path", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.cookie_secure", IniFlags.Supported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.use_cookies", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.use_only_cookies", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.encode_sources", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.entropy_file", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.entropy_length", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.referer_check", IniFlags.Unsupported | IniFlags.Local | IniFlags.Http, d, s); IniOptions.Register("session.use_trans_sid", IniFlags.Unsupported | IniFlags.Global | IniFlags.Http, d, s); // date: IniOptions.Register("date.default_latitude", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("date.default_longitude", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("date.sunrise_zenith", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("date.sunset_zenith", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("date.timezone", IniFlags.Supported | IniFlags.Local, d, s); }
/// <summary> /// Registeres a legacy configuration option. Not thread safe. /// </summary> /// <param name="name">A case-sensitive unique option name.</param> /// <param name="flags">Flags.</param> /// <param name="gsr">A delegate pointing to a method which will perform option's value getting, setting, and restoring.</param> /// <param name="extension">A case-sensitive name of the extension which the option belongs to. Can be a <B>null</B> reference.</param> /// <remarks> /// Registered options are known to <c>ini_get</c>, <c>ini_set</c>, and <c>ini_restore</c> PHP functions. /// </remarks> /// <exception cref="ArgumentNullException"><paramref name="name"/> is a <B>null</B> reference.</exception> /// <exception cref="ArgumentNullException"><paramref name="gsr"/> is a <B>null</B> reference.</exception> /// <exception cref="ArgumentException">An option with specified name has already been registered.</exception> public static void Register(string name, IniFlags flags, GetSetRestoreDelegate gsr, string extension) { if (name == null) { throw new ArgumentNullException("name"); } if (gsr == null) { throw new ArgumentNullException("gsr"); } if (options.ContainsKey(name)) { throw new ArgumentException(LibResources.GetString("option_already_registered", name)); } options.Add(name, new OptionDefinition(flags, gsr, extension)); }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = MySqlLibraryDescriptor.ExtensionName; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); // local: IniOptions.Register("mysql.trace_mode", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_port", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_socket", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_host", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_user", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_password", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.connect_timeout", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.default_command_timeout", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mysql.connection_string", IniFlags.Supported | IniFlags.Local, d, s); // global: IniOptions.Register("mysql.allow_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); IniOptions.Register("mysql.max_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); IniOptions.Register("mysql.max_links", IniFlags.Supported | IniFlags.Global, d, s); IniOptions.Register("mysql.max_pool_size", IniFlags.Supported | IniFlags.Global, d, s); }
internal OptionDefinition(IniFlags flags, GetSetRestoreDelegate gsr, string extension) { this.Flags = flags; this.Gsr = gsr; this.Extension = extension; }
/// <summary> /// Registeres a legacy configuration option. Not thread safe. /// </summary> /// <param name="name">A case-sensitive unique option name.</param> /// <param name="flags">Flags.</param> /// <param name="gsr">A delegate pointing to a method which will perform option's value getting, setting, and restoring.</param> /// <param name="extension">A case-sensitive name of the extension which the option belongs to. Can be a <B>null</B> reference.</param> /// <remarks> /// Registered options are known to <c>ini_get</c>, <c>ini_set</c>, and <c>ini_restore</c> PHP functions. /// </remarks> /// <exception cref="ArgumentNullException"><paramref name="name"/> is a <B>null</B> reference.</exception> /// <exception cref="ArgumentNullException"><paramref name="gsr"/> is a <B>null</B> reference.</exception> /// <exception cref="ArgumentException">An option with specified name has already been registered.</exception> public static void Register(string name, IniFlags flags, GetSetRestoreDelegate gsr, string extension) { if (name == null) throw new ArgumentNullException("name"); if (gsr == null) throw new ArgumentNullException("gsr"); if (options.ContainsKey(name)) throw new ArgumentException(LibResources.GetString("option_already_registered", name)); options.Add(name, new OptionDefinition(flags, gsr, extension)); }
/// <summary> /// Registers legacy ini-options. /// </summary> internal static void RegisterLegacyOptions() { const string s = MsSqlLibraryDescriptor.ExtensionName; GetSetRestoreDelegate d = new GetSetRestoreDelegate(GetSetRestore); // global: IniOptions.Register("mssql.max_links", IniFlags.Supported | IniFlags.Global, d, s); IniOptions.Register("mssql.secure_connection", IniFlags.Supported | IniFlags.Global, d, s); IniOptions.Register("mssql.allow_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); IniOptions.Register("mssql.max_persistent", IniFlags.Unsupported | IniFlags.Global, d, s); // local: IniOptions.Register("mssql.connect_timeout", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mssql.timeout", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mssql.batchsize", IniFlags.Supported | IniFlags.Local, d, s); IniOptions.Register("mssql.min_error_severity", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.min_message_severity", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.compatability_mode", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.textsize", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.textlimit", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.datetimeconvert", IniFlags.Unsupported | IniFlags.Local, d, s); IniOptions.Register("mssql.max_procs", IniFlags.Unsupported | IniFlags.Local, d, s); }